ID:355 - Fix printf() related warnings in lib/ipmi_delloem.c

This commit is contained in:
Zdenek Styblik 2016-05-30 06:38:09 +02:00
parent 681bc21d32
commit f62a16f7f2

View File

@ -3061,9 +3061,9 @@ ipmi_get_power_headroom_command(struct ipmi_intf * intf,uint8_t unit)
if (unit == btuphr) { if (unit == btuphr) {
peakpowerheadroombtuphr = watt_to_btuphr_conversion(powerheadroom.peakheadroom); peakpowerheadroombtuphr = watt_to_btuphr_conversion(powerheadroom.peakheadroom);
instantpowerhearoom = watt_to_btuphr_conversion(powerheadroom.instheadroom); instantpowerhearoom = watt_to_btuphr_conversion(powerheadroom.instheadroom);
printf("System Instantaneous Headroom : %lld BTU/hr\n", printf("System Instantaneous Headroom : %" PRId64 " BTU/hr\n",
instantpowerhearoom); instantpowerhearoom);
printf("System Peak Headroom : %lld BTU/hr\n", printf("System Peak Headroom : %" PRId64 " BTU/hr\n",
peakpowerheadroombtuphr); peakpowerheadroombtuphr);
} else { } else {
printf("System Instantaneous Headroom : %d W\n", printf("System Instantaneous Headroom : %d W\n",
@ -3452,63 +3452,63 @@ ipmi_print_power_consmpt_history(struct ipmi_intf * intf, int unit)
if (unit == btuphr) { if (unit == btuphr) {
printf("Average Power Consumption "); printf("Average Power Consumption ");
tempbtuphrconv = watt_to_btuphr_conversion(avgpower.lastminutepower); tempbtuphrconv = watt_to_btuphr_conversion(avgpower.lastminutepower);
printf("%4lld BTU/hr ", tempbtuphrconv); printf("%4" PRId64 " BTU/hr ", tempbtuphrconv);
tempbtuphrconv = watt_to_btuphr_conversion(avgpower.lasthourpower); tempbtuphrconv = watt_to_btuphr_conversion(avgpower.lasthourpower);
printf("%4lld BTU/hr ", tempbtuphrconv); printf("%4" PRId64 " BTU/hr ", tempbtuphrconv);
tempbtuphrconv = watt_to_btuphr_conversion(avgpower.lastdaypower); tempbtuphrconv = watt_to_btuphr_conversion(avgpower.lastdaypower);
printf("%4lld BTU/hr ", tempbtuphrconv); printf("%4" PRId64 " BTU/hr ", tempbtuphrconv);
tempbtuphrconv = watt_to_btuphr_conversion(avgpower.lastweakpower); tempbtuphrconv = watt_to_btuphr_conversion(avgpower.lastweakpower);
printf("%4lld BTU/hr\n", tempbtuphrconv); printf("%4" PRId64 " BTU/hr\n", tempbtuphrconv);
printf("Max Power Consumption "); printf("Max Power Consumption ");
tempbtuphrconv = watt_to_btuphr_conversion(stPeakpower.lastminutepower); tempbtuphrconv = watt_to_btuphr_conversion(stPeakpower.lastminutepower);
printf("%4lld BTU/hr ", tempbtuphrconv); printf("%4" PRId64 " BTU/hr ", tempbtuphrconv);
tempbtuphrconv = watt_to_btuphr_conversion(stPeakpower.lasthourpower); tempbtuphrconv = watt_to_btuphr_conversion(stPeakpower.lasthourpower);
printf("%4lld BTU/hr ", tempbtuphrconv); printf("%4" PRId64 " BTU/hr ", tempbtuphrconv);
tempbtuphrconv = watt_to_btuphr_conversion(stPeakpower.lastdaypower); tempbtuphrconv = watt_to_btuphr_conversion(stPeakpower.lastdaypower);
printf("%4lld BTU/hr ", tempbtuphrconv); printf("%4" PRId64 " BTU/hr ", tempbtuphrconv);
tempbtuphrconv = watt_to_btuphr_conversion(stPeakpower.lastweakpower); tempbtuphrconv = watt_to_btuphr_conversion(stPeakpower.lastweakpower);
printf("%4lld BTU/hr\n", tempbtuphrconv); printf("%4" PRId64 " BTU/hr\n", tempbtuphrconv);
printf("Min Power Consumption "); printf("Min Power Consumption ");
tempbtuphrconv = watt_to_btuphr_conversion(stMinpower.lastminutepower); tempbtuphrconv = watt_to_btuphr_conversion(stMinpower.lastminutepower);
printf("%4lld BTU/hr ", tempbtuphrconv); printf("%4" PRId64 " BTU/hr ", tempbtuphrconv);
tempbtuphrconv = watt_to_btuphr_conversion(stMinpower.lasthourpower); tempbtuphrconv = watt_to_btuphr_conversion(stMinpower.lasthourpower);
printf("%4lld BTU/hr ", tempbtuphrconv); printf("%4" PRId64 " BTU/hr ", tempbtuphrconv);
tempbtuphrconv = watt_to_btuphr_conversion(stMinpower.lastdaypower); tempbtuphrconv = watt_to_btuphr_conversion(stMinpower.lastdaypower);
printf("%4lld BTU/hr ", tempbtuphrconv); printf("%4" PRId64 " BTU/hr ", tempbtuphrconv);
tempbtuphrconv = watt_to_btuphr_conversion(stMinpower.lastweakpower); tempbtuphrconv = watt_to_btuphr_conversion(stMinpower.lastweakpower);
printf("%4lld BTU/hr\n\n", tempbtuphrconv); printf("%4" PRId64 " BTU/hr\n\n", tempbtuphrconv);
} else { } else {
printf("Average Power Consumption "); printf("Average Power Consumption ");
tempbtuphrconv = (avgpower.lastminutepower); tempbtuphrconv = (avgpower.lastminutepower);
printf("%4lld W ", tempbtuphrconv); printf("%4" PRId64 " W ", tempbtuphrconv);
tempbtuphrconv = (avgpower.lasthourpower); tempbtuphrconv = (avgpower.lasthourpower);
printf("%4lld W ", tempbtuphrconv); printf("%4" PRId64 " W ", tempbtuphrconv);
tempbtuphrconv = (avgpower.lastdaypower); tempbtuphrconv = (avgpower.lastdaypower);
printf("%4lld W ", tempbtuphrconv); printf("%4" PRId64 " W ", tempbtuphrconv);
tempbtuphrconv=(avgpower.lastweakpower); tempbtuphrconv=(avgpower.lastweakpower);
printf("%4lld W \n", tempbtuphrconv); printf("%4" PRId64 " W \n", tempbtuphrconv);
printf("Max Power Consumption "); printf("Max Power Consumption ");
tempbtuphrconv = (stPeakpower.lastminutepower); tempbtuphrconv = (stPeakpower.lastminutepower);
printf("%4lld W ", tempbtuphrconv); printf("%4" PRId64 " W ", tempbtuphrconv);
tempbtuphrconv = (stPeakpower.lasthourpower); tempbtuphrconv = (stPeakpower.lasthourpower);
printf("%4lld W ", tempbtuphrconv); printf("%4" PRId64 " W ", tempbtuphrconv);
tempbtuphrconv = (stPeakpower.lastdaypower); tempbtuphrconv = (stPeakpower.lastdaypower);
printf("%4lld W ", tempbtuphrconv); printf("%4" PRId64 " W ", tempbtuphrconv);
tempbtuphrconv = (stPeakpower.lastweakpower); tempbtuphrconv = (stPeakpower.lastweakpower);
printf("%4lld W \n", tempbtuphrconv); printf("%4" PRId64 " W \n", tempbtuphrconv);
printf("Min Power Consumption "); printf("Min Power Consumption ");
tempbtuphrconv = (stMinpower.lastminutepower); tempbtuphrconv = (stMinpower.lastminutepower);
printf("%4lld W ", tempbtuphrconv); printf("%4" PRId64 " W ", tempbtuphrconv);
tempbtuphrconv = (stMinpower.lasthourpower); tempbtuphrconv = (stMinpower.lasthourpower);
printf("%4lld W ", tempbtuphrconv); printf("%4" PRId64 " W ", tempbtuphrconv);
tempbtuphrconv = (stMinpower.lastdaypower); tempbtuphrconv = (stMinpower.lastdaypower);
printf("%4lld W ", tempbtuphrconv); printf("%4" PRId64 " W ", tempbtuphrconv);
tempbtuphrconv = (stMinpower.lastweakpower); tempbtuphrconv = (stMinpower.lastweakpower);
printf("%4lld W \n\n", tempbtuphrconv); printf("%4" PRId64 " W \n\n", tempbtuphrconv);
} }
lastminutepeakpower = stPeakpower.lastminutepowertime; lastminutepeakpower = stPeakpower.lastminutepowertime;
@ -3612,11 +3612,11 @@ ipmi_print_power_cap(struct ipmi_intf * intf,uint8_t unit)
if (rc == 0) { if (rc == 0) {
if (unit == btuphr) { if (unit == btuphr) {
tempbtuphrconv = watt_to_btuphr_conversion(ipmipowercap.MaximumPowerConsmp); tempbtuphrconv = watt_to_btuphr_conversion(ipmipowercap.MaximumPowerConsmp);
printf("Maximum power: %lld BTU/hr\n", tempbtuphrconv); printf("Maximum power: %" PRId64 " BTU/hr\n", tempbtuphrconv);
tempbtuphrconv = watt_to_btuphr_conversion(ipmipowercap.MinimumPowerConsmp); tempbtuphrconv = watt_to_btuphr_conversion(ipmipowercap.MinimumPowerConsmp);
printf("Minimum power: %lld BTU/hr\n", tempbtuphrconv); printf("Minimum power: %" PRId64 " BTU/hr\n", tempbtuphrconv);
tempbtuphrconv = watt_to_btuphr_conversion(ipmipowercap.PowerCap); tempbtuphrconv = watt_to_btuphr_conversion(ipmipowercap.PowerCap);
printf("Power cap : %lld BTU/hr\n", tempbtuphrconv); printf("Power cap : %" PRId64 " BTU/hr\n", tempbtuphrconv);
} else { } else {
printf("Maximum power: %d Watt\n", ipmipowercap.MaximumPowerConsmp); printf("Maximum power: %d Watt\n", ipmipowercap.MaximumPowerConsmp);
printf("Minimum power: %d Watt\n", ipmipowercap.MinimumPowerConsmp); printf("Minimum power: %d Watt\n", ipmipowercap.MinimumPowerConsmp);