1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-07-29 13:01:14 +03:00

examples: fix various compiler warnings

This commit is contained in:
Daniel Stenberg
2019-03-15 16:45:57 +01:00
parent bd5a620d1a
commit 54ff8ffc6d
5 changed files with 25 additions and 35 deletions

View File

@ -36,21 +36,11 @@
#include <stdio.h>
#include <ctype.h>
/* last resort for systems not defining PRIu64 in inttypes.h */
#ifndef __PRI64_PREFIX
#ifdef WIN32
#define __PRI64_PREFIX "I64"
#define __FILESIZE "I64"
#else
#if __WORDSIZE == 64
#define __PRI64_PREFIX "l"
#else
#define __PRI64_PREFIX "ll"
#endif /* __WORDSIZE */
#endif /* WIN32 */
#endif /* !__PRI64_PREFIX */
#ifndef PRIu64
#define PRIu64 __PRI64_PREFIX "u"
#endif /* PRIu64 */
#define __FILESIZE "llu"
#endif
int main(int argc, char *argv[])
{
@ -217,7 +207,7 @@ int main(int argc, char *argv[])
}
if(attrs.flags & LIBSSH2_SFTP_ATTR_SIZE) {
printf("%8" PRIu64 " ", attrs.filesize);
printf("%8" __FILESIZE " ", attrs.filesize);
}
printf("%s\n", mem);