lcm-proj / lcm

Lightweight Communications and Marshalling
GNU Lesser General Public License v2.1
944 stars 385 forks source link

Clean up a few C compiler warnings #387

Closed ihilt closed 1 year ago

ihilt commented 1 year ago

Fixes the following warnings on master:

lcm/lcm_mpudpm.c:401:14: warning: assignment to ‘struct sockaddr_in *’ from incompatible pointer type ‘struct sockaddr *’ [-Wincompatible-pointer-types]
  401 |     key.from = &(lcmb->from);

lcm/lcm_udpm.c:246:14: warning: assignment to ‘struct sockaddr_in *’ from incompatible pointer type ‘struct sockaddr *’ [-Wincompatible-pointer-types]
  246 |     key.from = &(lcmb->from);

lcm/lcmgen/emit_go.c:1150:9: warning: unused variable ‘readVar’ [-Wunused-variable]
 1150 |     int readVar = 0;

lcm/lcmgen/emit_go.c:102:14: warning: ‘first_to_upper’ defined but not used [-Wunused-function]
  102 | static char *first_to_upper(const char *const str)

lcm/lcmgen/emit_go.c:51:14: warning: ‘dots_to_underscores’ defined but not used [-Wunused-function]
   51 | static char *dots_to_underscores(const char *const s)