Code:
zpaq.cpp: In function ‘bool comparecrc32block(s_crc32block, s_crc32block)’:
zpaq.cpp:3001:40: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
sprintf(a_start,"%014lld",a.crc32start);
~~~~~~~~~~~~^
zpaq.cpp:3002:40: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
sprintf(b_start,"%014lld",b.crc32start);
~~~~~~~~~~~~^
zpaq.cpp: In function ‘void mygetch()’:
zpaq.cpp:3202:17: error: aggregate ‘mygetch()::termios oldt’ has incomplete type and cannot be defined
struct termios oldt, newt;
^~~~
zpaq.cpp:3202:23: error: aggregate ‘mygetch()::termios newt’ has incomplete type and cannot be defined
struct termios oldt, newt;
^~~~
zpaq.cpp:3203:2: error: ‘tcgetattr’ was not declared in this scope
tcgetattr ( STDIN_FILENO, &oldt );
^~~~~~~~~
zpaq.cpp:3203:2: note: suggested alternative: ‘tcgetpgrp’
tcgetattr ( STDIN_FILENO, &oldt );
^~~~~~~~~
tcgetpgrp
zpaq.cpp:3205:21: error: ‘ICANON’ was not declared in this scope
newt.c_lflag &= ~( ICANON | ECHO );
^~~~~~
zpaq.cpp:3205:30: error: ‘ECHO’ was not declared in this scope
newt.c_lflag &= ~( ICANON | ECHO );
^~~~
zpaq.cpp:3205:30: note: suggested alternative: ‘EIO’
newt.c_lflag &= ~( ICANON | ECHO );
^~~~
EIO
zpaq.cpp:3206:28: error: ‘TCSANOW’ was not declared in this scope
tcsetattr ( STDIN_FILENO, TCSANOW, &newt );
^~~~~~~
zpaq.cpp:3206:28: note: suggested alternative: ‘TCSETAW’
tcsetattr ( STDIN_FILENO, TCSANOW, &newt );
^~~~~~~
TCSETAW
zpaq.cpp:3206:2: error: ‘tcsetattr’ was not declared in this scope
tcsetattr ( STDIN_FILENO, TCSANOW, &newt );
^~~~~~~~~
zpaq.cpp:3206:2: note: suggested alternative: ‘tcsetpgrp’
tcsetattr ( STDIN_FILENO, TCSANOW, &newt );
^~~~~~~~~
tcsetpgrp
zpaq.cpp: In function ‘int myhuman(char*, size_t, int64_t, const char*, int, int)’:
zpaq.cpp:7869:14: error: ‘HN_DIVISOR_1000’ was not declared in this scope
if (flags & HN_DIVISOR_1000) {
^~~~~~~~~~~~~~~
zpaq.cpp:7872:15: error: ‘HN_B’ was not declared in this scope
if (flags & HN_B)
^~~~
zpaq.cpp:7882:15: error: ‘HN_B’ was not declared in this scope
if (flags & HN_B)
^~~~
zpaq.cpp:7892:16: error: ‘HN_AUTOSCALE’ was not declared in this scope
(scale & (HN_AUTOSCALE | HN_GETSCALE)) == 0)
^~~~~~~~~~~~
zpaq.cpp:7892:31: error: ‘HN_GETSCALE’ was not declared in this scope
(scale & (HN_AUTOSCALE | HN_GETSCALE)) == 0)
^~~~~~~~~~~
zpaq.cpp:7892:31: note: suggested alternative: ‘F_GET_SEALS’
(scale & (HN_AUTOSCALE | HN_GETSCALE)) == 0)
^~~~~~~~~~~
F_GET_SEALS
zpaq.cpp:7909:14: error: ‘HN_NOSPACE’ was not declared in this scope
if (flags & HN_NOSPACE)
^~~~~~~~~~
zpaq.cpp:7909:14: note: suggested alternative: ‘N_6PACK’
if (flags & HN_NOSPACE)
^~~~~~~~~~
N_6PACK
zpaq.cpp:7921:15: error: ‘HN_AUTOSCALE’ was not declared in this scope
if (scale & (HN_AUTOSCALE | HN_GETSCALE)) {
^~~~~~~~~~~~
zpaq.cpp:7921:30: error: ‘HN_GETSCALE’ was not declared in this scope
if (scale & (HN_AUTOSCALE | HN_GETSCALE)) {
^~~~~~~~~~~
zpaq.cpp:7921:30: note: suggested alternative: ‘F_GET_SEALS’
if (scale & (HN_AUTOSCALE | HN_GETSCALE)) {
^~~~~~~~~~~
F_GET_SEALS
zpaq.cpp:7936:38: error: ‘HN_DECIMAL’ was not declared in this scope
if (bytes < 995 && i > 0 && flags & HN_DECIMAL) {
^~~~~~~~~~
zpaq.cpp: In function ‘void tohuman(long long int, char*)’:
zpaq.cpp:7959:10: error: ‘HN_B’ was not declared in this scope
flags = HN_B | HN_NOSPACE | HN_DECIMAL;
^~~~
zpaq.cpp:7959:17: error: ‘HN_NOSPACE’ was not declared in this scope
flags = HN_B | HN_NOSPACE | HN_DECIMAL;
^~~~~~~~~~
zpaq.cpp:7959:17: note: suggested alternative: ‘N_6PACK’
flags = HN_B | HN_NOSPACE | HN_DECIMAL;
^~~~~~~~~~
N_6PACK
zpaq.cpp:7959:30: error: ‘HN_DECIMAL’ was not declared in this scope
flags = HN_B | HN_NOSPACE | HN_DECIMAL;
^~~~~~~~~~
zpaq.cpp:7960:11: error: ‘HN_DIVISOR_1000’ was not declared in this scope
flags |= HN_DIVISOR_1000;
^~~~~~~~~~~~~~~
zpaq.cpp:7962:17: error: ‘HN_AUTOSCALE’ was not declared in this scope
bytes, "", HN_AUTOSCALE, flags);
^~~~~~~~~~~~
zpaq.cpp: In function ‘long long int getfreespace(const char*)’:
zpaq.cpp:7968:16: error: aggregate ‘getfreespace(const char*)::statfs stat’ has incomplete type and cannot be defined
struct statfs stat;
^~~~
zpaq.cpp:7970:26: error: invalid use of incomplete type ‘struct getfreespace(const char*)::statfs’
if (statfs(i_path, &stat) != 0)
^
zpaq.cpp:7968:9: note: forward declaration of ‘struct getfreespace(const char*)::statfs’
struct statfs stat;
^~~~~~
zpaq.cpp:7982:3: error: ‘getbsize’ was not declared in this scope
getbsize(&dummy, &blocksize);
^~~~~~~~
zpaq.cpp:7982:3: note: suggested alternative: ‘getsid’
getbsize(&dummy, &blocksize);
^~~~~~~~
getsid
zpaq.cpp: In member function ‘int Jidac::summa()’:
zpaq.cpp:8403:103: warning: embedded ‘\0’ in format [-Wformat-contains-nul]
sprintf(p->second.sha1hex,"%08X\0x0",crc32_calc_file(filename.c_str(),inizio,total_size,lavorati));
^
zpaq.cpp:8409:104: warning: embedded ‘\0’ in format [-Wformat-contains-nul]
sprintf(p->second.sha1hex,"%08X\0x0",crc32c_calc_file(filename.c_str(),inizio,total_size,lavorati));
^
zpaq.cpp:8416:53: warning: format ‘%llX’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
sprintf(p->second.sha1hex,"%016llX\0x0",result2);
^
zpaq.cpp:8416:53: warning: embedded ‘\0’ in format [-Wformat-contains-nul]
zpaq.cpp:8488:76: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘int64_t {aka long int}’ [-Wformat=]
printf("Worked on %lld average speed %s B/s\n",lavorati,migliaia(myspeed));
^
zpaq.cpp: In function ‘int unz(const char*, const char*, bool)’:
zpaq.cpp:11231:116: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
printf("%02d frags %s (RAM used ~ %s)\r",100-(offset*100/(total_size+1)),migliaia(frag.size()),migliaia2(ramsize));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
zpaq.cpp:11286:140: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘unsigned int’ [-Wformat=]
printf("File %08lld of %08lld (%20s) %1.3f %s\n",i+1,(long long)mappadt.size(),migliaia(size),(mtime()-startrecalc)/1000.0,fn.c_str());
~~~ ^
zpaq.cpp: In member function ‘int Jidac::test()’:
zpaq.cpp:11721:58: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘unsigned int’ [-Wformat=]
printf("Block %08lu K %s\r",i/1000,migliaia(lavorati));
~~~~~~ ^
zpaq.cpp:11839:102: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 3 has type ‘const char*’ [-Wformat=]
printf("SURE: STORED %08X = DECOMPRESSED = FROM FILE %08Xn",crc32stored,filedefinitivo.c_str());
~~~~~~~~~~~~~~~~~~~~~~^
zpaq.cpp:11852:89: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 3 has type ‘const char*’ [-Wformat=]
printf("GOOD: STORED %08X = DECOMPRESSED %08X\n",crc32stored,filedefinitivo.c_str());
~~~~~~~~~~~~~~~~~~~~~~^
zpaq.cpp: In function ‘bool comparefilenamesize(s_fileandsize, s_fileandsize)’:
zpaq.cpp:11962:33: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
sprintf(a_size,"%014lld",a.size);
~~~~~~^
zpaq.cpp:11963:33: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
sprintf(b_size,"%014lld",b.size);
~~~~~~^
zpaq.cpp: In function ‘bool comparefilenamedate(s_fileandsize, s_fileandsize)’:
zpaq.cpp:11970:33: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘int64_t {aka long int}’ [-Wformat=]
sprintf(a_size,"%014lld",a.date);
~~~~~~^
zpaq.cpp:11971:33: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘int64_t {aka long int}’ [-Wformat=]
sprintf(b_size,"%014lld",b.date);
~~~~~~^
zpaq.cpp: In member function ‘int Jidac::dir()’:
zpaq.cpp:12008:39: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘std::vector<std::__cxx11::basic_string<char> >::size_type {aka long unsigned int}’ [-Wformat=]
printf("FIles.size %d\n",files.size());
~~~~~~~~~~~~^
zpaq.cpp:12108:87: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
printf("PRE %08d %08d %s\n",i,fileandsize[i].size,fileandsize[i].filename.c_str());
^
zpaq.cpp:12118:88: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
printf("POST %08d %08d %s\n",i,fileandsize[i].size,fileandsize[i].filename.c_str());
^
zpaq.cpp:12176:173: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Wformat=]
printf("%08ld CRC-1 %08X %s %19s %s\n",i,fileandsize[i].crc32,dateToString(fileandsize[i].date).c_str(),migliaia(fileandsize[i].size),fileandsize[i].filename.c_str());
^
zpaq.cpp:12181:39: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘int64_t {aka long int}’ [-Wformat=]
printf("Done %03d ",percentuale);
^
zpaq.cpp:12204:182: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Wformat=]
printf("%08ld CRC-2 %08X %s %19s %s\n",i+1,fileandsize[i+1].crc32,dateToString(fileandsize[i+1].date).c_str(),migliaia(fileandsize[i+1].size),fileandsize[i+1].filename.c_str());
~~~ ^
zpaq.cpp:12209:38: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘int64_t {aka long int}’ [-Wformat=]
printf("Done %03d ",percentuale);
^
zpaq.cpp:12250:88: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Wformat=]
printf("%ld size %s <<%08X>>\n",i,migliaia(fileandsize.size()),fileandsize[i].crc32);
^
zpaq.cpp:12260:38: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Wformat=]
printf("Limit founded %ld\n",limite);
^
zpaq.cpp:12353:71: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Wformat=]
printf(" %8ld File %19s byte\n",quantifiles,migliaia(total_size));
^
zpaq.cpp:12355:43: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Wformat=]
printf(" %8ld directory",quantedirectory);
^
zpaq.cpp: In member function ‘int Jidac::dircompare()’:
zpaq.cpp:12709:61: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘std::vector<std::__cxx11::basic_string<char> >::size_type {aka long unsigned int}’ [-Wformat=]
printf("Dir compare (%d dirs to be checked)\n",files.size());
~~~~~~~~~~~~^
zpaq.cpp:12769:51: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘std::vector<std::__cxx11::basic_string<char> >::size_type {aka long unsigned int}’ [-Wformat=]
printf("Creating %d scan threads\n",files.size());
~~~~~~~~~~~~^
I have