Repository navigation
Closed
Labels
compilationIssues related to compiling source codeIssues related to compiling source code
Description
It would be good to clean all those warnings :)
/home/tkloczko/rpmbuild/BUILD/minizip-2.8.6/lib/brg/aescrypt.c: In function 'aes_encrypt':
/home/tkloczko/rpmbuild/BUILD/minizip-2.8.6/lib/brg/aescrypt.c:117:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
117 | kp += 2 * N_COLS;
/home/tkloczko/rpmbuild/BUILD/minizip-2.8.6/lib/brg/aescrypt.c:118:5: note: here
118 | case 12 * 16:
| ^~~~
/home/tkloczko/rpmbuild/BUILD/minizip-2.8.6/lib/brg/aescrypt.c:121:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
121 | kp += 2 * N_COLS;
/home/tkloczko/rpmbuild/BUILD/minizip-2.8.6/lib/brg/aescrypt.c:122:5: note: here
122 | case 10 * 16:
| ^~~~
/home/tkloczko/rpmbuild/BUILD/minizip-2.8.6/lib/brg/aescrypt.c: In function 'aes_decrypt':
/home/tkloczko/rpmbuild/BUILD/minizip-2.8.6/lib/brg/aescrypt.c:198:37: warning: this statement may fall through [-Wimplicit-fallthrough=]
198 | #define inv_rnd(y,x,k,c) (s(y,c) = (k)[c] ^ four_tables(x,t_use(i,n),inv_var,rf1,c))
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/minizip-2.8.6/lib/brg/aescrypt.c:49:64: note: in expansion of macro 'inv_rnd'
49 | #define round(rm,y,x,k) rm(y,x,k,0); rm(y,x,k,1); rm(y,x,k,2); rm(y,x,k,3)
| ^~
/home/tkloczko/rpmbuild/BUILD/minizip-2.8.6/lib/brg/aescrypt.c:249:9: note: in expansion of macro 'round'
249 | round(inv_rnd, b0, b1, rnd_key(-12));
| ^~~~~
/home/tkloczko/rpmbuild/BUILD/minizip-2.8.6/lib/brg/aescrypt.c:250:5: note: here
250 | case 12 * 16:
| ^~~~
/home/tkloczko/rpmbuild/BUILD/minizip-2.8.6/lib/brg/aescrypt.c:198:37: warning: this statement may fall through [-Wimplicit-fallthrough=]
198 | #define inv_rnd(y,x,k,c) (s(y,c) = (k)[c] ^ four_tables(x,t_use(i,n),inv_var,rf1,c))
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/minizip-2.8.6/lib/brg/aescrypt.c:49:64: note: in expansion of macro 'inv_rnd'
49 | #define round(rm,y,x,k) rm(y,x,k,0); rm(y,x,k,1); rm(y,x,k,2); rm(y,x,k,3)
| ^~
/home/tkloczko/rpmbuild/BUILD/minizip-2.8.6/lib/brg/aescrypt.c:252:9: note: in expansion of macro 'round'
252 | round(inv_rnd, b0, b1, rnd_key(-10));
| ^~~~~
/home/tkloczko/rpmbuild/BUILD/minizip-2.8.6/lib/brg/aescrypt.c:253:5: note: here
253 | case 10 * 16:
| ^~~~
In function 'strncpy',
inlined from 'mz_os_get_file_date' at /home/tkloczko/rpmbuild/BUILD/minizip-2.8.6/mz_os_posix.c:174:9:
/usr/include/bits/string_fortified.h:106:10: warning: '__builtin_strncpy' specified bound depends on the length of the source argument [-Wstringop-overflow=]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ^
/home/tkloczko/rpmbuild/BUILD/minizip-2.8.6/mz_os_posix.c: In function 'mz_os_get_file_date':
/home/tkloczko/rpmbuild/BUILD/minizip-2.8.6/mz_os_posix.c:172:15: note: length computed here
172 | len = strlen(path);
| ^
In file included from /usr/include/string.h:494,
from /home/tkloczko/rpmbuild/BUILD/minizip-2.8.6/mz.h:156,
from /home/tkloczko/rpmbuild/BUILD/minizip-2.8.6/test/test.c:12:
In function 'strncpy',
inlined from 'test_crypt_aes' at /home/tkloczko/rpmbuild/BUILD/minizip-2.8.6/test/test.c:609:5:
/usr/include/bits/string_fortified.h:106:10: warning: 'strncpy' output truncated before terminating nul copying 16 bytes from a string of the same length [-Wstringop-truncation]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Metadata
Metadata
Assignees
Labels
compilationIssues related to compiling source codeIssues related to compiling source code
Activity
nmoinvaz commentedon Apr 30, 2019
I do accept pull requests. :-) The brg library is not really something I maintain thou.
Coeur commentedon May 1, 2019
@kloczek if you replace
strncpywithstrlcpy, does it fix a warning for you?Also, I'm not sure that we care about
-Wimplicit-fallthrough(as it's inconvenient to make it explicit), so you may ignore it.nmoinvaz commentedon May 1, 2019
Or could use
memcpythere too which is available on all platforms.Use memcpy instead of strncpy to avoid gcc 9 warning. #385
kloczek commentedon May 1, 2019
Don't get me wrong but my main task is to cleanly packaged some stuff.
Just dropped you warnings which popped on front of me when I've been building minizip :)
Fixed gcc 9 warnings. #385
nmoinvaz commentedon May 1, 2019
Ok I think I have fixed some. But I don't have GCC 9 so I can't really test. And the BRG warnings I don't plan on fixing.