fixes for warnings during build time for the application in gnu/usr.bin/gdb with the exception of one warning
Diff Detail
Diff Detail
- Lint
No Lint Coverage - Unit
No Test Coverage - Build Status
Buildable 9822 Build 10257: arc lint + arc unit
Event Timeline
Comment Actions
Changelog:
Pre-fix warnings are at: https://github.llnw.net/gist/aprieger/25d1af09f4ef0881a2d8
- contrib/gdb/gdb/arch-utils.c
- warning: passing 'bfd_byte *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
- fix: added the explicit modifier (char *) to parameters on lines 48 and 60
- warning: passing 'bfd_byte *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
- contrib/gdb/gdb/ax-gdb.c
- warning: 20 enumeration values not handled in switch: 'TYPE_CODE_UNDEF', 'TYPE_CODE_PTR', 'TYPE_CODE_INT'... [-Wswitch]
- fix: added the default case that simply breaks for the enumeration values on line 745
- warning: 20 enumeration values not handled in switch: 'TYPE_CODE_UNDEF', 'TYPE_CODE_PTR', 'TYPE_CODE_INT'... [-Wswitch]
- contrib/gdb/gdb/breakpoint.c
- warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
- fix: removed the extra parenthesis for the expressions on lines 2650, 2662
- warning: expression result unused [-Wunused-value]
- fix: removed the unused expressions on lines 5546 and 7623
- warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
- contrib/gdb/gdb/c-typeprint.c
- warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
- fix: added the explicit modifier (int) to suppress the warning on line 543
- warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
Comment Actions
I'm not sure it's worth patching very old contrib code for warning fixes.
contrib/gdb/gdb/breakpoint.c | ||
---|---|---|
7622 | It seems odd to remove one and not the other. Either both are used (if TARGET_CAN_USE_HARDWARE_WATCHPOINT() expands to is default of invoking the function), or neither is used (if the macro expands to something else as it does for some i386 targets). There is no case where only 'i' is used but not 'mem_cnt'. | |
contrib/gdb/gdb/c-typeprint.c | ||
543 | This would do the wrong thing for a very long array (sizeof(foo[]) > 2^31). |