Tracker: Patches

5 Format specifier patch - ID: 3529607
Last Update: Comment added ( jjames )

While compiling on a 32-bit platform, I saw some GCC warnings about printf arguments not matching the corresponding format specifiers. This patch fixes all of the warnings I saw on that platform.


Jerry James ( jjames ) - 2012-05-24 15:52:20 PDT

5

Open

None

Nobody/Anonymous

None

None

Public


Comments ( 2 )

Date: 2012-09-27 12:56:25 PDT
Sender: jjames

I have attached a second version of the patch. With this version, I see no
format specifier warnings on either 32-bit or 64-bit x86. On the other
hand, this patch is uglier than my first attempt. :-(


Date: 2012-05-24 18:37:08 PDT
Sender: sdsProject AdminAccepting Donations

this patch results in these warnings on amd64:

In file included from ../src/spvw.d:161:0:
../src/spvw_debug.d: In function ‘nobject_out1’:
../src/spvw_debug.d:123:5: warning: format ‘%lu’ expects argument of
type ‘long unsigned int’, but argument 3 has type ‘uintWL’
[-Wformat]
../src/spvw_debug.d:124:5: warning: format ‘%lu’ expects argument of
type ‘long unsigned int’, but argument 3 has type ‘uintL’
[-Wformat]
../src/spvw_debug.d:188:13: warning: format ‘%lu’ expects argument of
type ‘long unsigned int’, but argument 3 has type ‘uintL’
[-Wformat]
../src/spvw_debug.d:188:13: warning: format ‘%lu’ expects argument of
type ‘long unsigned int’, but argument 4 has type ‘unsigned int’
[-Wformat]
../src/spvw_debug.d:188:13: warning: format ‘%lu’ expects argument of
type ‘long unsigned int’, but argument 5 has type ‘unsigned int’
[-Wformat]
../src/spvw_debug.d:284:5: warning: format ‘%lu’ expects argument of
type ‘long unsigned int’, but argument 3 has type ‘unsigned int’
[-Wformat]
../src/spvw_debug.d:289:13: warning: format ‘%lu’ expects argument of
type ‘long unsigned int’, but argument 5 has type ‘int’ [-Wformat]
../src/spvw_debug.d:289:13: warning: format ‘%lu’ expects argument of
type ‘long unsigned int’, but argument 6 has type ‘int’ [-Wformat]
../src/spvw_debug.d:289:13: warning: format ‘%u’ expects argument of
type ‘unsigned int’, but argument 7 has type ‘long unsigned int’
[-Wformat]
../src/spvw_debug.d: In function ‘bt_out’:
../src/spvw_debug.d:362:11: warning: format ‘%lu’ expects argument of
type ‘long unsigned int’, but argument 3 has type ‘uintL’
[-Wformat]
../src/spvw_debug.d:371:13: warning: format ‘%lu’ expects argument of
type ‘long unsigned int’, but argument 3 has type ‘unsigned int’
[-Wformat]
In file included from ../src/spvw.d:3996:0:
../src/spvw_memfile.d: In function ‘loadmem_from_handle’:
../src/spvw_memfile.d:1820:5: warning: format ‘%lu’ expects argument of
type ‘long unsigned int’, but argument 3 has type ‘uintL’
[-Wformat]
In file included from ../src/error.d:502:0:
../src/errunix.d: In function ‘errno_out_low’:
../src/errunix.d:97:3: warning: format ‘%lu’ expects argument of type
‘long unsigned int’, but argument 4 has type ‘uintL’ [-Wformat]



Attached Files ( 2 )

Filename Description Download
clisp-format.patch Format specifier patch Download
clisp-format.patch Format specifier patch v2 Download

Changes ( 2 )

Field Old Value Date By
File Added 453975: clisp-format.patch 2012-09-27 12:55:27 PDT jjames
File Added 444383: clisp-format.patch 2012-05-24 15:52:21 PDT jjames