DenVdmj / xdelta

Automatically exported from code.google.com/p/xdelta (actual: https://github.com/jmacd/xdelta-devel/)
0 stars 0 forks source link

printing uint64_t #162

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Dear Josh,

when compiling, I noted a lot of 'printf' related warnings ; the point is that 
the same Q specifier is used to print 'size_t' and 'uint64_t' objects,  but in 
32bit arches those are different; I prepared two preliminary patches that fix 
most warnings but not all of them;  the build log after adding the patches is  

https://buildd.debian.org/status/fetch.php?pkg=xdelta3&arch=i386&ver=3.0.7-dfsg-
2&stamp=1371454355

a.

Original issue reported on code.google.com by mennu...@debian.org on 18 Jun 2013 at 7:55

GoogleCodeExporter commented 9 years ago

Original comment by mennu...@debian.org on 18 Jun 2013 at 7:56

Attachments:

GoogleCodeExporter commented 9 years ago
this is useful

http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#64-bit_Portabilit
y

Original comment by mennu...@debian.org on 18 Jun 2013 at 7:57

GoogleCodeExporter commented 9 years ago
http://stackoverflow.com/questions/2524611/how-to-print-size-t-variable-portably

says: 

[printing 'size_t' varies depending on what compiler you're using :

gnu says %zu (or %zx, or %zd but that displays it as though it were signed, 
etc.)
Microsoft says %Iu (or %Ix, or %Id but again that's signed, etc.)

Original comment by mennu...@debian.org on 18 Jun 2013 at 8:01