<div dir="ltr"><div>GCC version is 4.8.1</div><div><br></div><div>I was compiling Git master on my laptop for some testing and saw these warnings:</div><div><i>Note: I was only compiling the default module set (so there might be more warnings in modules outside of that set).</i></div>
<div><br></div><div><div><b>mi_rpc.so (building libbinrpc.so.0.1)</b></div><div>binrpc_api.c: In function ‘binrpc_response_to_text’:<br></div><div>binrpc_api.c:1044:82: warning: ‘val.u.strval.len’ may be used uninitialized in this function [-Wmaybe-uninitialized]</div>
<div>  *buf_len += (TEXT_BUFF_ALLOC_CHUNK < req_len) ? TEXT_BUFF_ALLOC_CHUNK + req_len : TEXT_BUFF_ALLOC_CHUNK;</div><div>                                                                                  ^</div><div>binrpc_api.c:1154:20: note: ‘val.u.strval.len’ was declared here</div>
<div>  struct binrpc_val val;</div><div>                    ^</div><div><br></div><div><b>pike.so</b><br></div><div>pike_top.c: In function ‘pike_top_print_addr’:<br></div><div>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]</div>
<div>  memset( buff, 0, sizeof(buff));</div><div>                         ^</div><div><br></div><div><b>sca.so</b></div><div>sca_call_info.c: In function ‘sca_call_info_update’:<br></div><div>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]</div>
<div>  ((ci1) != NULL || \</div><div>         ^</div><div>sca_call_info.h:56:4: note: in expansion of macro ‘SCA_CALL_INFO_EMPTY’</div><div>  (!SCA_CALL_INFO_EMPTY((ci1)) && \</div><div>    ^</div><div>sca_call_info.c:1977:7: note: in expansion of macro ‘SCA_CALL_INFO_IS_SHARED_CALLER’</div>
<div>  if ( SCA_CALL_INFO_IS_SHARED_CALLER( &call_info ) &&</div><div>       ^</div><div>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]</div>
<div>  ((ci1) != NULL || \</div><div>         ^</div><div>sca_call_info.h:60:4: note: in expansion of macro ‘SCA_CALL_INFO_EMPTY’</div><div>  (!SCA_CALL_INFO_EMPTY((ci1)) && \</div><div>    ^</div><div>sca_call_info.c:1984:14: note: in expansion of macro ‘SCA_CALL_INFO_IS_SHARED_CALLEE’</div>
<div>  } else if ( SCA_CALL_INFO_IS_SHARED_CALLEE( &call_info ) &&</div><div>              ^</div><div><br></div><div><b>seas.so</b></div><div>event_dispatcher.c: In function ‘dispatcher_main_loop’:</div><div>
event_dispatcher.c:271:27: warning: array subscript is above array bounds [-Warray-bounds]</div><div>    poll_fds[j].fd=poll_fds[j+1].fd;</div><div>                           ^</div><div>event_dispatcher.c:272:31: warning: array subscript is above array bounds [-Warray-bounds]</div>
<div>    poll_fds[j].events=poll_fds[j+1].events;</div><div>                               ^</div><div>event_dispatcher.c:273:32: warning: array subscript is above array bounds [-Warray-bounds]</div><div>    poll_fds[j].revents=poll_fds[j+1].revents;</div>
<div>                                ^</div><div>event_dispatcher.c:271:27: warning: array subscript is above array bounds [-Warray-bounds]</div><div>    poll_fds[j].fd=poll_fds[j+1].fd;</div><div>                           ^</div>
<div>event_dispatcher.c:271:12: warning: array subscript is above array bounds [-Warray-bounds]</div><div>    poll_fds[j].fd=poll_fds[j+1].fd;</div><div>            ^</div><div>event_dispatcher.c:272:31: warning: array subscript is above array bounds [-Warray-bounds]</div>
<div>    poll_fds[j].events=poll_fds[j+1].events;</div><div>                               ^</div><div>event_dispatcher.c:272:12: warning: array subscript is above array bounds [-Warray-bounds]</div><div>    poll_fds[j].events=poll_fds[j+1].events;</div>
<div>            ^</div><div>event_dispatcher.c:273:32: warning: array subscript is above array bounds [-Warray-bounds]</div><div>    poll_fds[j].revents=poll_fds[j+1].revents;</div><div>                                ^</div>
<div>event_dispatcher.c:273:12: warning: array subscript is above array bounds [-Warray-bounds]</div><div>    poll_fds[j].revents=poll_fds[j+1].revents;</div><div>            ^</div><div>event_dispatcher.c:271:27: warning: array subscript is above array bounds [-Warray-bounds]</div>
<div>    poll_fds[j].fd=poll_fds[j+1].fd;</div><div>                           ^</div><div>event_dispatcher.c:271:12: warning: array subscript is above array bounds [-Warray-bounds]</div><div>    poll_fds[j].fd=poll_fds[j+1].fd;</div>
<div>            ^</div><div>event_dispatcher.c:272:31: warning: array subscript is above array bounds [-Warray-bounds]</div><div>    poll_fds[j].events=poll_fds[j+1].events;</div><div>                               ^</div>
<div>event_dispatcher.c:272:12: warning: array subscript is above array bounds [-Warray-bounds]</div><div>    poll_fds[j].events=poll_fds[j+1].events;</div><div>            ^</div><div>event_dispatcher.c:273:32: warning: array subscript is above array bounds [-Warray-bounds]</div>
<div>    poll_fds[j].revents=poll_fds[j+1].revents;</div><div>                                ^</div><div>event_dispatcher.c:273:12: warning: array subscript is above array bounds [-Warray-bounds]</div><div>    poll_fds[j].revents=poll_fds[j+1].revents;</div>
<div>            ^</div><div>event_dispatcher.c:271:27: warning: array subscript is above array bounds [-Warray-bounds]</div><div>    poll_fds[j].fd=poll_fds[j+1].fd;</div><div>                           ^</div><div>event_dispatcher.c:271:12: warning: array subscript is above array bounds [-Warray-bounds]</div>
<div>    poll_fds[j].fd=poll_fds[j+1].fd;</div><div>            ^</div><div>event_dispatcher.c:272:31: warning: array subscript is above array bounds [-Warray-bounds]</div><div>    poll_fds[j].events=poll_fds[j+1].events;</div>
<div>                               ^</div><div>event_dispatcher.c:272:12: warning: array subscript is above array bounds [-Warray-bounds]</div><div>    poll_fds[j].events=poll_fds[j+1].events;</div><div>            ^</div>
<div>event_dispatcher.c:273:32: warning: array subscript is above array bounds [-Warray-bounds]</div><div>    poll_fds[j].revents=poll_fds[j+1].revents;</div><div>                                ^</div><div>event_dispatcher.c:273:12: warning: array subscript is above array bounds [-Warray-bounds]</div>
<div>    poll_fds[j].revents=poll_fds[j+1].revents;</div><div>            ^</div><div><br></div><div><b>sms.so</b></div><div>libsms_modem.c: In function ‘put_command’:</div><div>libsms_modem.c:77:7: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]</div>
<div>  write(mdm->fd,cmd,cmd_len);</div><div>       ^</div><div><br></div></div><div><br></div><div>Regards,</div><div><br>Peter</div><div><br></div>-- <br><div dir="ltr"><div><font face="courier new, monospace">Peter Dunkley</font></div>
<div><font face="courier new, monospace">Technical Director</font></div><div><font face="courier new, monospace">Crocodile RCS Ltd</font></div></div>
</div>