I'm pretty sure I've seen these in some of the 64-bit compiles.  I've
largely ignored them thus far because I had no easy solution at the
time.  %zu looks like exactly what I wanted to have the first time I
encountered this.

Rick

On Tue, Feb 8, 2011 at 3:06 PM, CVBruce <cvbr...@gmail.com> wrote:
> Would it be possible to check the build machine to see if we are getting 
> those warning messages on other platforms?
>
> Bruce
> On Feb 8, 2011, at 11:58 AM, Rick McGuire wrote:
>
>> On Tue, Feb 8, 2011 at 2:54 PM, CVBruce <cvbr...@gmail.com> wrote:
>>> Thanks Rony,
>>> I'll fix the file system 64 messages.  I've already fixed a bunch of them so
>>> it is no problem to fix a few more.  I don't know about the format errors or
>>> the nodebug errors.
>>
>> The format errors have been around for a while and I wasn't sure there
>> was a portable solution here.  I just did a Google search, and I found
>> the following discussion thread (for a question originally asked by
>> David Ashley):
>>
>> http://www.velocityreviews.com/forums/t593117-printf-specification-for-size_t.html
>>
>> It appears that the solution is to use %zu as the format spec when
>> printing size_t items.  This assumes all of the compiler's we're using
>> are C99 compatible.  I'm certainly hoping they are.
>>
>> Rick
>>
>>
>>> Bruce
>>> On Feb 8, 2011, at 11:38 AM, Rony G. Flatscher wrote:
>>>
>>> Hi there,
>>>
>>> as I know that one aim is to have ooRexx compiled without warnings on all
>>> platforms, I supply a list of warnings if compiling with gcc from the latest
>>> Xcode on 10.6.0 (Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010;
>>> root:xnu-1504.9.26~3/RELEASE_I386).
>>>
>>> There is one warning, that occurs on compiling for 64-bit (86_64), but not
>>> when compiling for 32-bit (i386):
>>>
>>> ./interpreter/memory/RexxMemory.cpp:1593: warning: format ‘%u’ expects type
>>> ‘unsigned int’, but argument 2 has type ‘long int’
>>>
>>>
>>> The listing is from the 64-bit compile and otherwise matches the warnings
>>> for the 32--bit compile.
>>>
>>> Regards,
>>>
>>> ---rony
>>>
>>> -------------- cut here --------------
>>> ./interpreter/classes/support/RexxDateTime.cpp:1142: warning: format ‘%d’
>>> expects type ‘int’, but argument 3 has type ‘wholenumber_t’
>>> ./interpreter/classes/support/RexxDateTime.cpp:1301: warning: format ‘%d’
>>> expects type ‘int’, but argument 3 has type ‘wholenumber_t’
>>> ./interpreter/memory/DeadObject.cpp:221: warning: format ‘%d’ expects type
>>> ‘int’, but argument 3 has type ‘size_t’
>>> ./interpreter/memory/DeadObject.cpp:221: warning: format ‘%d’ expects type
>>> ‘int’, but argument 5 has type ‘size_t’
>>> ./interpreter/memory/MemorySegment.cpp:54: warning: format ‘%d’ expects type
>>> ‘int’, but argument 4 has type ‘size_t’
>>> ./interpreter/memory/MemorySegment.cpp:54: warning: format ‘%u’ expects type
>>> ‘unsigned int’, but argument 6 has type ‘size_t’
>>> ./interpreter/memory/MemorySegment.cpp:56: warning: format ‘%d’ expects type
>>> ‘int’, but argument 4 has type ‘size_t’
>>> ./interpreter/memory/MemorySegment.cpp:57: warning: format ‘%d’ expects type
>>> ‘int’, but argument 4 has type ‘size_t’
>>> ./interpreter/memory/MemorySegment.cpp:57: warning: format ‘%u’ expects type
>>> ‘unsigned int’, but argument 5 has type ‘size_t’
>>> ./interpreter/memory/MemoryStats.cpp:133: warning: format ‘%d’ expects type
>>> ‘int’, but argument 3 has type ‘size_t’
>>> ./interpreter/memory/MemoryStats.cpp:133: warning: format ‘%d’ expects type
>>> ‘int’, but argument 4 has type ‘size_t’
>>> ./interpreter/memory/MemoryStats.cpp:134: warning: format ‘%d’ expects type
>>> ‘int’, but argument 2 has type ‘size_t’
>>> ./interpreter/memory/MemoryStats.cpp:134: warning: format ‘%d’ expects type
>>> ‘int’, but argument 3 has type ‘size_t’
>>> ./interpreter/memory/MemoryStats.cpp:135: warning: format ‘%d’ expects type
>>> ‘int’, but argument 2 has type ‘size_t’
>>> ./interpreter/memory/MemoryStats.cpp:135: warning: format ‘%d’ expects type
>>> ‘int’, but argument 3 has type ‘size_t’
>>> ./interpreter/memory/MemoryStats.cpp:136: warning: format ‘%d’ expects type
>>> ‘int’, but argument 2 has type ‘size_t’
>>> ./interpreter/memory/MemoryStats.cpp:136: warning: format ‘%d’ expects type
>>> ‘int’, but argument 3 has type ‘size_t’
>>> ./interpreter/memory/MemoryStats.cpp:145: warning: format ‘%8d’ expects type
>>> ‘int’, but argument 3 has type ‘size_t’
>>> ./interpreter/memory/MemoryStats.cpp:145: warning: format ‘%8d’ expects type
>>> ‘int’, but argument 4 has type ‘size_t’
>>> ./interpreter/memory/RexxMemory.cpp:1593: warning: format ‘%u’ expects type
>>> ‘unsigned int’, but argument 2 has type ‘long int’
>>> ./interpreter/memory/RexxMemory.cpp:1766: warning: format ‘%d’ expects type
>>> ‘int’, but argument 2 has type ‘size_t’
>>> ./interpreter/memory/RexxMemory.cpp:1885: warning: format ‘%d’ expects type
>>> ‘int’, but argument 3 has type ‘size_t’
>>> ./interpreter/memory/RexxMemory.cpp:1896: warning: format ‘%d’ expects type
>>> ‘int’, but argument 3 has type ‘size_t’
>>> ./interpreter/memory/RexxMemory.cpp:1897: warning: format ‘%d’ expects type
>>> ‘int’, but argument 2 has type ‘wholenumber_t’
>>> ./interpreter/memory/RexxMemory.cpp:1897: warning: format ‘%d’ expects type
>>> ‘int’, but argument 3 has type ‘wholenumber_t’
>>> ./interpreter/memory/RexxMemory.cpp:1912: warning: format ‘%d’ expects type
>>> ‘int’, but argument 3 has type ‘size_t’
>>> ./interpreter/memory/RexxMemory.cpp:2033: warning: format ‘%d’ expects type
>>> ‘int’, but argument 2 has type ‘size_t’
>>> ./interpreter/concurrency/RexxActivity.cpp:819: warning: format ‘%d’ expects
>>> type ‘int’, but argument 3 has type ‘long int’
>>> ./interpreter/concurrency/RexxActivity.cpp:819: warning: format ‘%1d’
>>> expects type ‘int’, but argument 4 has type ‘long int’
>>> ./interpreter/concurrency/RexxActivity.cpp:1045: warning: format ‘%1d’
>>> expects type ‘int’, but argument 3 has type ‘long int’
>>> ./interpreter/concurrency/RexxActivity.cpp:1045: warning: format ‘%3.3d’
>>> expects type ‘int’, but argument 4 has type ‘long int’
>>> ./interpreter/concurrency/RexxActivity.cpp:2858: warning: field precision
>>> should have type ‘int’, but argument 2 has type ‘size_t’
>>> ./interpreter/expression/BuiltinFunctions.cpp:1223: warning: format ‘%u’
>>> expects type ‘unsigned int’, but argument 3 has type ‘wholenumber_t’
>>> ./interpreter/expression/BuiltinFunctions.cpp:1223: warning: format ‘%4.4u’
>>> expects type ‘unsigned int’, but argument 5 has type ‘wholenumber_t’
>>> ./interpreter/parser/SourceFile.cpp:938: warning: format ‘%u’ expects type
>>> ‘unsigned int’, but argument 3 has type ‘size_t’
>>> ./interpreter/platform/unix/SysFileSystem.cpp:215: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./interpreter/platform/unix/SysFileSystem.cpp:215: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./interpreter/platform/unix/SysFileSystem.cpp:484: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./interpreter/platform/unix/SysFileSystem.cpp:484: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./interpreter/platform/unix/SysFileSystem.cpp:537: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./interpreter/platform/unix/SysFileSystem.cpp:537: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./interpreter/platform/unix/SysFileSystem.cpp:783: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./interpreter/platform/unix/SysFileSystem.cpp:783: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./interpreter/platform/unix/SysFileSystem.cpp:828: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./interpreter/platform/unix/SysFileSystem.cpp:828: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./interpreter/platform/unix/SysFileSystem.cpp:844: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./interpreter/platform/unix/SysFileSystem.cpp:844: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./interpreter/platform/unix/SysFileSystem.cpp:862: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./interpreter/platform/unix/SysFileSystem.cpp:862: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./interpreter/platform/unix/SysFileSystem.cpp:880: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./interpreter/platform/unix/SysFileSystem.cpp:880: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./interpreter/platform/unix/SysFileSystem.cpp:955: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./interpreter/platform/unix/SysFileSystem.cpp:955: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./interpreter/platform/unix/SysFileSystem.cpp:977: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./interpreter/platform/unix/SysFileSystem.cpp:977: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./common/platform/unix/SysFile.cpp:964: warning: ‘fstat64’ is deprecated
>>> (declared at /usr/include/sys/stat.h:463)
>>> ./common/platform/unix/SysFile.cpp:964: warning: ‘fstat64’ is deprecated
>>> (declared at /usr/include/sys/stat.h:463)
>>> ./common/platform/unix/SysFile.cpp:993: warning: ‘stat64’ is deprecated
>>> (declared at /usr/include/sys/stat.h:465)
>>> ./common/platform/unix/SysFile.cpp:993: warning: ‘stat64’ is deprecated
>>> (declared at /usr/include/sys/stat.h:465)
>>> ./common/platform/unix/SysFile.cpp:1026: warning: ‘fstat64’ is deprecated
>>> (declared at /usr/include/sys/stat.h:463)
>>> ./common/platform/unix/SysFile.cpp:1026: warning: ‘fstat64’ is deprecated
>>> (declared at /usr/include/sys/stat.h:463)
>>> ./common/platform/unix/SysFile.cpp:1051: warning: ‘stat64’ is deprecated
>>> (declared at /usr/include/sys/stat.h:465)
>>> ./common/platform/unix/SysFile.cpp:1051: warning: ‘stat64’ is deprecated
>>> (declared at /usr/include/sys/stat.h:465)
>>> ./common/platform/unix/SysFile.cpp:1083: warning: ‘fstat64’ is deprecated
>>> (declared at /usr/include/sys/stat.h:463)
>>> ./common/platform/unix/SysFile.cpp:1083: warning: ‘fstat64’ is deprecated
>>> (declared at /usr/include/sys/stat.h:463)
>>> warning: no debug symbols in executable (-arch x86_64)
>>> ./common/platform/unix/SysFile.cpp:964: warning: ‘fstat64’ is deprecated
>>> (declared at /usr/include/sys/stat.h:463)
>>> ./common/platform/unix/SysFile.cpp:964: warning: ‘fstat64’ is deprecated
>>> (declared at /usr/include/sys/stat.h:463)
>>> ./common/platform/unix/SysFile.cpp:993: warning: ‘stat64’ is deprecated
>>> (declared at /usr/include/sys/stat.h:465)
>>> ./common/platform/unix/SysFile.cpp:993: warning: ‘stat64’ is deprecated
>>> (declared at /usr/include/sys/stat.h:465)
>>> ./common/platform/unix/SysFile.cpp:1026: warning: ‘fstat64’ is deprecated
>>> (declared at /usr/include/sys/stat.h:463)
>>> ./common/platform/unix/SysFile.cpp:1026: warning: ‘fstat64’ is deprecated
>>> (declared at /usr/include/sys/stat.h:463)
>>> ./common/platform/unix/SysFile.cpp:1051: warning: ‘stat64’ is deprecated
>>> (declared at /usr/include/sys/stat.h:465)
>>> ./common/platform/unix/SysFile.cpp:1051: warning: ‘stat64’ is deprecated
>>> (declared at /usr/include/sys/stat.h:465)
>>> ./common/platform/unix/SysFile.cpp:1083: warning: ‘fstat64’ is deprecated
>>> (declared at /usr/include/sys/stat.h:463)
>>> ./common/platform/unix/SysFile.cpp:1083: warning: ‘fstat64’ is deprecated
>>> (declared at /usr/include/sys/stat.h:463)
>>> warning: no debug symbols in executable (-arch x86_64)
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:598: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:598: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:1175: warning: format
>>> ‘%10lu’ expects type ‘long unsigned int’, but argument 9 has type ‘off_t’
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:1186: warning: format
>>> ‘%10lu’ expects type ‘long unsigned int’, but argument 8 has type ‘off_t’
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:1198: warning: format
>>> ‘%10lu’ expects type ‘long unsigned int’, but argument 9 has type ‘off_t’
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:1234: warning: format ‘%d’
>>> expects type ‘int’, but argument 3 has type ‘size_t’
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:1888: warning: format ‘%d’
>>> expects type ‘int’, but argument 3 has type ‘size_t’
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:1962: warning: format ‘%d’
>>> expects type ‘int’, but argument 3 has type ‘size_t’
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:2048: warning: format ‘%d’
>>> expects type ‘int’, but argument 3 has type ‘size_t’
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:2168: warning: format ‘%d’
>>> expects type ‘int’, but argument 3 has type ‘size_t’
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:2178: warning: format ‘%d’
>>> expects type ‘int’, but argument 3 has type ‘size_t’
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:2202: warning: format ‘%d’
>>> expects type ‘int’, but argument 3 has type ‘size_t’
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:2883: warning: format ‘%d’
>>> expects type ‘int’, but argument 3 has type ‘size_t’
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:2978: warning: format
>>> ‘%01u’ expects type ‘unsigned int’, but argument 3 has type ‘size_t’
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:2981: warning: format
>>> ‘%02u’ expects type ‘unsigned int’, but argument 3 has type ‘size_t’
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:2984: warning: format
>>> ‘%03u’ expects type ‘unsigned int’, but argument 3 has type ‘size_t’
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:2987: warning: format
>>> ‘%04u’ expects type ‘unsigned int’, but argument 3 has type ‘size_t’
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:2990: warning: format
>>> ‘%05u’ expects type ‘unsigned int’, but argument 3 has type ‘size_t’
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:4018: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:4018: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:4107: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:4107: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:4746: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:4746: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:4765: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:4765: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:4783: warning: ‘lstat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:464)
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:4783: warning: ‘lstat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:464)
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:4801: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> ./extensions/rexxutil/platform/unix/rexxutil.cpp:4801: warning: ‘stat64’ is
>>> deprecated (declared at /usr/include/sys/stat.h:465)
>>> warning: no debug symbols in executable (-arch x86_64)
>>> warning: no debug symbols in executable (-arch x86_64)
>>> warning: no debug symbols in executable (-arch x86_64)
>>> warning: no debug symbols in executable (-arch x86_64)
>>> cmdparse.cpp:1618: warning: deprecated conversion from string constant to
>>> ‘char*’
>>> cmdparse.cpp:1764: warning: deprecated conversion from string constant to
>>> ‘char*’
>>> warning: no debug symbols in executable (-arch x86_64)
>>> warning: no debug symbols in executable (-arch x86_64)
>>> ./rexxapi/server/QueueManager.cpp:575: warning: format ‘%s’ expects type
>>> ‘char*’, but argument 3 has type ‘void*’
>>> ./rexxapi/server/QueueManager.cpp:575: warning: format ‘%s’ expects type
>>> ‘char*’, but argument 4 has type ‘void*’
>>> ./utilities/rexx/platform/unix/rexx.cpp:113: warning: format not a string
>>> literal and no format arguments
>>> ./utilities/rexxc/platform/unix/RexxCompiler.cpp:147: warning: format not a
>>> string literal and no format arguments
>>> -------------- cut here --------------
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
>>> Pinpoint memory and threading errors before they happen.
>>> Find and fix more than 250 security defects in the development cycle.
>>> Locate bottlenecks in serial and parallel code that limit performance.
>>> http://p.sf.net/sfu/intel-dev2devfeb_______________________________________________
>>> Oorexx-devel mailing list
>>> Oorexx-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
>>> Pinpoint memory and threading errors before they happen.
>>> Find and fix more than 250 security defects in the development cycle.
>>> Locate bottlenecks in serial and parallel code that limit performance.
>>> http://p.sf.net/sfu/intel-dev2devfeb
>>> _______________________________________________
>>> Oorexx-devel mailing list
>>> Oorexx-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>>>
>>>
>>
>> ------------------------------------------------------------------------------
>> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
>> Pinpoint memory and threading errors before they happen.
>> Find and fix more than 250 security defects in the development cycle.
>> Locate bottlenecks in serial and parallel code that limit performance.
>> http://p.sf.net/sfu/intel-dev2devfeb
>> _______________________________________________
>> Oorexx-devel mailing list
>> Oorexx-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to