GCC version is 4.8.1
I was compiling Git master on my laptop for some testing and saw these warnings: *Note: I was only compiling the default module set (so there might be more warnings in modules outside of that set).*
*mi_rpc.so (building libbinrpc.so.0.1)* binrpc_api.c: In function ‘binrpc_response_to_text’: binrpc_api.c:1044:82: warning: ‘val.u.strval.len’ may be used uninitialized in this function [-Wmaybe-uninitialized] *buf_len += (TEXT_BUFF_ALLOC_CHUNK < req_len) ? TEXT_BUFF_ALLOC_CHUNK + req_len : TEXT_BUFF_ALLOC_CHUNK;
^ binrpc_api.c:1154:20: note: ‘val.u.strval.len’ was declared here struct binrpc_val val; ^
*pike.so* pike_top.c: In function ‘pike_top_print_addr’: pike_top.c:23:25: warning: argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess] memset( buff, 0, sizeof(buff)); ^
*sca.so* sca_call_info.c: In function ‘sca_call_info_update’: sca_call_info.h:51:9: warning: the comparison will always evaluate as ‘true’ for the address of ‘call_info’ will never be NULL [-Waddress] ((ci1) != NULL || \ ^ sca_call_info.h:56:4: note: in expansion of macro ‘SCA_CALL_INFO_EMPTY’ (!SCA_CALL_INFO_EMPTY((ci1)) && \ ^ sca_call_info.c:1977:7: note: in expansion of macro ‘SCA_CALL_INFO_IS_SHARED_CALLER’ if ( SCA_CALL_INFO_IS_SHARED_CALLER( &call_info ) && ^ sca_call_info.h:51:9: warning: the comparison will always evaluate as ‘true’ for the address of ‘call_info’ will never be NULL [-Waddress] ((ci1) != NULL || \ ^ sca_call_info.h:60:4: note: in expansion of macro ‘SCA_CALL_INFO_EMPTY’ (!SCA_CALL_INFO_EMPTY((ci1)) && \ ^ sca_call_info.c:1984:14: note: in expansion of macro ‘SCA_CALL_INFO_IS_SHARED_CALLEE’ } else if ( SCA_CALL_INFO_IS_SHARED_CALLEE( &call_info ) && ^
*seas.so* event_dispatcher.c: In function ‘dispatcher_main_loop’: event_dispatcher.c:271:27: warning: array subscript is above array bounds [-Warray-bounds] poll_fds[j].fd=poll_fds[j+1].fd; ^ event_dispatcher.c:272:31: warning: array subscript is above array bounds [-Warray-bounds] poll_fds[j].events=poll_fds[j+1].events; ^ event_dispatcher.c:273:32: warning: array subscript is above array bounds [-Warray-bounds] poll_fds[j].revents=poll_fds[j+1].revents; ^ event_dispatcher.c:271:27: warning: array subscript is above array bounds [-Warray-bounds] poll_fds[j].fd=poll_fds[j+1].fd; ^ event_dispatcher.c:271:12: warning: array subscript is above array bounds [-Warray-bounds] poll_fds[j].fd=poll_fds[j+1].fd; ^ event_dispatcher.c:272:31: warning: array subscript is above array bounds [-Warray-bounds] poll_fds[j].events=poll_fds[j+1].events; ^ event_dispatcher.c:272:12: warning: array subscript is above array bounds [-Warray-bounds] poll_fds[j].events=poll_fds[j+1].events; ^ event_dispatcher.c:273:32: warning: array subscript is above array bounds [-Warray-bounds] poll_fds[j].revents=poll_fds[j+1].revents; ^ event_dispatcher.c:273:12: warning: array subscript is above array bounds [-Warray-bounds] poll_fds[j].revents=poll_fds[j+1].revents; ^ event_dispatcher.c:271:27: warning: array subscript is above array bounds [-Warray-bounds] poll_fds[j].fd=poll_fds[j+1].fd; ^ event_dispatcher.c:271:12: warning: array subscript is above array bounds [-Warray-bounds] poll_fds[j].fd=poll_fds[j+1].fd; ^ event_dispatcher.c:272:31: warning: array subscript is above array bounds [-Warray-bounds] poll_fds[j].events=poll_fds[j+1].events; ^ event_dispatcher.c:272:12: warning: array subscript is above array bounds [-Warray-bounds] poll_fds[j].events=poll_fds[j+1].events; ^ event_dispatcher.c:273:32: warning: array subscript is above array bounds [-Warray-bounds] poll_fds[j].revents=poll_fds[j+1].revents; ^ event_dispatcher.c:273:12: warning: array subscript is above array bounds [-Warray-bounds] poll_fds[j].revents=poll_fds[j+1].revents; ^ event_dispatcher.c:271:27: warning: array subscript is above array bounds [-Warray-bounds] poll_fds[j].fd=poll_fds[j+1].fd; ^ event_dispatcher.c:271:12: warning: array subscript is above array bounds [-Warray-bounds] poll_fds[j].fd=poll_fds[j+1].fd; ^ event_dispatcher.c:272:31: warning: array subscript is above array bounds [-Warray-bounds] poll_fds[j].events=poll_fds[j+1].events; ^ event_dispatcher.c:272:12: warning: array subscript is above array bounds [-Warray-bounds] poll_fds[j].events=poll_fds[j+1].events; ^ event_dispatcher.c:273:32: warning: array subscript is above array bounds [-Warray-bounds] poll_fds[j].revents=poll_fds[j+1].revents; ^ event_dispatcher.c:273:12: warning: array subscript is above array bounds [-Warray-bounds] poll_fds[j].revents=poll_fds[j+1].revents; ^
*sms.so* libsms_modem.c: In function ‘put_command’: libsms_modem.c:77:7: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result] write(mdm->fd,cmd,cmd_len); ^
Regards,
Peter