openhpi2 / Open-HPI

Open HPI is an open source implementation of the SA Forum's Hardware Platform Interface (HPI). HPI provides an abstracted interface to managing computer hardware, typically for chassis and rack based servers
Other
3 stars 1 forks source link

Fix compiler warnings in the build #2506

Closed openhpi2 closed 8 years ago

openhpi2 commented 11 years ago

Fix the compiler warning messages in the build. marshal.c:302: warning: format ‘%d’ expects type ‘int’, but argument 7 has type ‘size_t’ marshal.c:360: warning: format ‘%d’ expects type ‘int’, but argument 8 has type ‘size_t’ marshal.c:564: warning: format ‘%d’ expects type ‘int’, but argument 7 has type ‘size_t’ marshal.c:636: warning: format ‘%d’ expects type ‘int’, but argument 8 has type ‘size_t’ conf.c:500: warning: function declaration isn’t a prototype ipmi_con_smi.cpp:263: warning: ‘rv’ may be used uninitialized in this function ipmi_mc_vendor.cpp:364: warning: ‘snum’ may be used uninitialized in this function ipmi_rdr.h:92: warning: ‘cIpmiRdr::m_populate’ will be initialized after ipmi_rdr.h:57: warning: ‘unsigned int cIpmiRdr::m_sa’ ipmi_rdr.cpp:26: warning: when initialized here ipmi_rdr.h:58: warning: ‘cIpmiRdr::m_snum’ will be initialized after ipmi_rdr.h:56: warning: ‘unsigned int cIpmiRdr::m_chan’ ipmi_rdr.cpp:26: warning: when initialized here oa_soap_interconnect_event.c:782: warning: ‘sensor_info’ may be used uninitialized in this function

Reported by: dr_mohan

openhpi2 commented 11 years ago

*_ATTENTION_** This account is disabled and is no longer accessed by the recipient. Please remove it from your address book.

Thanks

Original comment by: tariqx

openhpi2 commented 11 years ago

Original comment by: dr_mohan

openhpi2 commented 11 years ago

Fixed in trunk revision 7552

Additional warnings were given when compiled with latest compiler. They are also fixed. ipmi warnings were not fixed as we could not test it after the fix. Will raise a separate bug for that. oa_soap_reset.c: In function 'oa_soap_get_reset_state': oa_soap_reset.c:69:34: warning: variable 'handler' set but not used [-Wunused-but-set-variable] oa_soap_discover.c: In function 'build_server_rdr': oa_soap_discover.c:1696:20: warning: variable 'event_support' set but not used [-Wunused-but-set-variable] oa_soap_discover.c: In function 'oa_soap_build_fz_rdr': oa_soap_discover.c:3300:26: warning: variable 'oa_handler' set but not used [-Wunused-but-set-variable] oa_soap_discover.c: In function 'oa_soap_push_disc_res': oa_soap_discover.c:3956:18: warning: variable 'rv' set but not used [-Wunused-but-set-variable] oa_soap_re_discover.c: In function 'oa_soap_re_disc_oa_sen': oa_soap_re_discover.c:2407:26: warning: variable 'oa_handler' set but not used [-Wunused-but-set-variable] oa_soap_event.c: In function 'process_oa_events': oa_soap_event.c:627:18: warning: variable 'rv' set but not used [-Wunused-but-set-variable] oa_soap_server_event.c: In function 'process_server_power_on_event': oa_soap_server_event.c:164:33: warning: variable 'oa_handler' set but not used [-Wunused-but-set-variable] oa_soap_server_event.c: In function 'process_server_power_event': oa_soap_server_event.c:294:38: warning: variable 'hotswap_state' set but not used [-Wunused-but-set-variable] oa_soap_server_event.c: In function 'process_server_info_event': oa_soap_server_event.c:577:20: warning: variable 'response' set but not used [-Wunused-but-set-variable] oa_soap_interconnect_event.c: In function 'oa_soap_proc_interconnect_thermal': oa_soap_interconnect_event.c:831:17: warning: 'sensor_info' may be used uninitialized in this function [-Wmaybe-uninitialized] oa_soap_control.c: In function 'oa_soap_get_control_state': oa_soap_control.c:214:31: warning: variable 'digital' set but not used [-Wunused-but-set-variable] oa_soap_control.c: In function 'oa_soap_set_control_state': oa_soap_control.c:417:33: warning: variable 'oa_handler' set but not used [-Wunused-but-set-variable] oa_soap_control.c: In function 'oa_soap_set_dynamic_pwr_cap_cntrl Fixed in trunk revision 7552

Original comment by: dr_mohan

openhpi2 commented 11 years ago

Original comment by: dr_mohan