On 02/17/08 16:40, Dave P wrote:
Compiling the new version on my 64-bit AMD processor produces the warnings below. I think they've probably been there for a while, I don't usually watch VDR compiling...
# g++ -v Using built-in specs. Target: x86_64-mandriva-linux-gnu Configured with: ../configure --prefix=/usr --libexecdir=/usr/lib --with-slibdir=/lib64 --mandir=/usr/share/man --infodir=/usr/share/info --enable-checking=release --enable-languages=c,c++,ada,fortran,objc,obj-c++,java --host=x86_64-mandriva-linux-gnu --with-cpu=generic --with-system-zlib --enable-threads=posix --enable-shared --enable-long-long --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --enable-java-awt=gtk --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --enable-gtk-cairo --disable-libjava-multilib --enable-ssp --disable-libssp Thread model: posix gcc version 4.2.2 20071128 (prerelease) (4.2.2-3.1mdv2008.0)
g++ -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses -c -DVDR_USER="vdr" -DLIRC_DEVICE="/dev/lircd" -DRCU_DEVICE="/dev/ttyS1" -D_GNU_SOURCE -DVIDEODIR="/video/video" -DCONFDIR="/video/video" -DPLUGINDIR="./PLUGINS/lib" -DLOCDIR="./locale" -I/usr/include/freetype2 dvbsubtitle.c dvbsubtitle.c: In member function ‘int cDvbSubtitleConverter::Convert(const uchar*, int)’: dvbsubtitle.c:709: warning: format ‘%lld’ expects type ‘long long int’, but argument 3 has type ‘int64_t’ dvbsubtitle.c: In member function ‘virtual void cDvbSubtitleConverter::Action()’: dvbsubtitle.c:776: warning: format ‘%lld’ expects type ‘long long int’, but argument 3 has type ‘int64_t’ dvbsubtitle.c:776: warning: format ‘%lld’ expects type ‘long long int’, but argument 4 has type ‘int64_t’ dvbsubtitle.c:776: warning: format ‘%lld’ expects type ‘long long int’, but argument 5 has type ‘int64_t’ dvbsubtitle.c: In member function ‘int cDvbSubtitleConverter::ExtractSegment(const uchar*, int, int64_t)’: dvbsubtitle.c:845: warning: format ‘%lld’ expects type ‘long long int’, but argument 5 has type ‘int64_t’
g++ -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses -c -DVDR_USER="vdr" -DLIRC_DEVICE="/dev/lircd" -DRCU_DEVICE="/dev/ttyS1" -D_GNU_SOURCE -DVIDEODIR="/video/video" -DCONFDIR="/video/video" -DPLUGINDIR="./PLUGINS/lib" -DLOCDIR="./locale" -I/usr/include/freetype2 remote.c remote.c: In member function ‘bool cRemote::Put(uint64_t, bool, bool)’: remote.c:124: warning: format ‘%016LX’ expects type ‘long long unsigned int’, but argument 4 has type ‘uint64_t’ remote.c:124: warning: format ‘%016LX’ expects type ‘long long unsigned int’, but argument 4 has type ‘uint64_t’
Apparently there are macros for this, like PRId64 and such. But i don't like having to write something like
int64_t n = ...; printf("Some number %" PRId64 "\n", n);
Don't know if the gettext mechanisms would be able to handle
tr("Some number %" PRId64 "\n")
I wonder why there ar no proper format specifiers for this. Or are there?
Klaus