Commit ab34731
committed
eeptools: Add casts to avoid compiler complaints
debian package results in:
/<<PKGBUILDDIR>>/eeptools/eeplib.c: In function ‘eepio_end’:
/<<PKGBUILDDIR>>/eeptools/eeplib.c:237:25: error: comparison of integer expressions of different signedness: ‘long int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Werror=sign-compare]
237 | if (pos != eep_header.eeplen)
| ^~
/<<PKGBUILDDIR>>/eeptools/eeplib.c:239:29: error: comparison of integer expressions of different signedness: ‘long int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Werror=sign-compare]
239 | if (pos_end != eep_header.eeplen)
| ^~
/<<PKGBUILDDIR>>/eeptools/eeplib.c:241:29: error: comparison of integer expressions of different signedness: ‘long int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Werror=sign-compare]
241 | if (pos_end != eep_header.eeplen)
| ^~
/<<PKGBUILDDIR>>/eeptools/eeplib.c: In function ‘eepio_atom_end’:
/<<PKGBUILDDIR>>/eeptools/eeplib.c:287:49: error: comparison of integer expressions of different signedness: ‘long int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Werror=sign-compare]
287 | if (pos - eepio_atom_data_start != eep_atom_header.dlen)
| ^~
cc1: all warnings being treated as errors
make[3]: *** [eeptools/CMakeFiles/eepmake.dir/build.make:93: eeptools/CMakeFiles/eepmake.dir/eeplib.c.o] Error 1
You can see these warnings with "gcc -O2 -Wall"1 parent 193e6e3 commit ab34731
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
238 | 238 | | |
239 | | - | |
| 239 | + | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
| 287 | + | |
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| |||
0 commit comments