Remove some warnings from travis

This commit is contained in:
Alexander Skovpen 2018-07-14 21:46:58 +03:00 committed by dukelsky
parent e6e77b0634
commit 30d600a418
2 changed files with 12 additions and 7 deletions

View File

@ -11,4 +11,5 @@ compiler:
before_install:
- cp golded3/mygolded.__h golded3/mygolded.h
script:
- make
- if [[ "$CXX" == "g++" ]]; then CPPFLAGS="-Wno-write-strings -Wno-unused-result" make; fi
- if [[ "$CXX" == "clang++" ]]; then CPPFLAGS="-Wno-keyword-macro -Wno-c++11-compat-deprecated-writable-strings" make; fi

View File

@ -214,7 +214,11 @@ class gnfile: gfile
for( unsigned n=1; n<__size; n++ ) {
v += uint32_t(c[n])>>(8*n);
}
#ifdef unix
delete[] c;
#else
delete(c);
#endif
memmove(&v,__ptr,__size);
return s;
}
@ -273,15 +277,15 @@ class gnfile: gfile
gnfile& operator<< (uint8_t o) { Fwrite(&o, sizeof(o)); return *this; }
gnfile& operator<< (uint16_t o) { uint8_t o8;
o8 = uint8_t(o && 0xff); Fwrite(&o8, sizeof(o8));
o8 = uint8_t((o<<8) && 0xff); Fwrite(&o8, sizeof(o8));
o8 = uint8_t(o & 0xff); Fwrite(&o8, sizeof(o8));
o8 = uint8_t((o<<8) & 0xff); Fwrite(&o8, sizeof(o8));
return *this;
}
gnfile& operator<< (uint32_t o) { uint8_t o8;
o8 = uint8_t(o && 0xff); Fwrite(&o8, sizeof(o8));
o8 = uint8_t((o<<8) && 0xff); Fwrite(&o8, sizeof(o8));
o8 = uint8_t((o<<16) && 0xff); Fwrite(&o8, sizeof(o8));
o8 = uint8_t((o<<24) && 0xff); Fwrite(&o8, sizeof(o8));
o8 = uint8_t(o & 0xff); Fwrite(&o8, sizeof(o8));
o8 = uint8_t((o<<8) & 0xff); Fwrite(&o8, sizeof(o8));
o8 = uint8_t((o<<16) & 0xff); Fwrite(&o8, sizeof(o8));
o8 = uint8_t((o<<24) & 0xff); Fwrite(&o8, sizeof(o8));
return *this;
}
/*