fix compile errors when -Wall is specified

This commit is contained in:
Duncan Laurie 2005-03-17 03:28:53 +00:00
parent 344cd68cc1
commit 47e42d3f32
8 changed files with 22 additions and 17 deletions

View File

@ -39,6 +39,7 @@
#include <inttypes.h>
#include <signal.h>
#include <string.h>
#include <strings.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

View File

@ -37,6 +37,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>

View File

@ -37,6 +37,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

View File

@ -60,7 +60,7 @@ ipmi_raw_main(struct ipmi_intf * intf, int argc, char ** argv)
}
else if (argc > sizeof(data))
{
printf("Raw command input limit (%d bytes) exceeded\n", sizeof(data));
lprintf(LOG_NOTICE, "Raw command input limit (256 bytes) exceeded");
return -1;
}

View File

@ -35,8 +35,8 @@
*/
#include <string.h>
#include <math.h>
#include <math.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
@ -131,37 +131,37 @@ sdr_convert_sensor_reading(struct sdr_record_full_sensor * sensor,
case SDR_SENSOR_L_LINEAR:
break;
case SDR_SENSOR_L_LN:
result = log(result);
result = logf(result);
break;
case SDR_SENSOR_L_LOG10:
result = log10(result);
result = log10f(result);
break;
case SDR_SENSOR_L_LOG2:
result = log2(result);
result = (float)(logf(result) / logf(2.0));
break;
case SDR_SENSOR_L_E:
result = exp(result);
result = expf(result);
break;
case SDR_SENSOR_L_EXP10:
result = exp10(result);
result = powf(10.0, result);
break;
case SDR_SENSOR_L_EXP2:
result = exp2(result);
result = powf(2.0, result);
break;
case SDR_SENSOR_L_1_X:
result = pow(result, -1.0); /*1/x w/o exception*/
result = powf(result, -1.0); /*1/x w/o exception*/
break;
case SDR_SENSOR_L_SQR:
result = result * result;
result = powf(result, 2.0);
break;
case SDR_SENSOR_L_CUBE:
result = pow(result, 3.0);
result = powf(result, 3.0);
break;
case SDR_SENSOR_L_SQRT:
result = sqrt(result);
result = sqrtf(result);
break;
case SDR_SENSOR_L_CUBERT:
result = cbrt(result);
result = cbrtf(result);
break;
}
@ -422,7 +422,7 @@ ipmi_sdr_print_sensor_full(struct ipmi_intf * intf,
/* only handle linear sensors and linearized sensors (for now) */
if (sensor->linearization>=SDR_SENSOR_L_NONLINEAR) {
printf("sensor %s non-linear!\n", desc);
return;
return -1;
}
/* get sensor reading */

View File

@ -195,7 +195,7 @@ ipmi_sensor_print_full_analog(struct ipmi_intf * intf,
/* only handle linear and linearized sensors (for now) */
if (sensor->linearization>=SDR_SENSOR_L_NONLINEAR) {
printf("sensor %s non-linear!\n", id);
return;
return -1;
}
/*

View File

@ -36,8 +36,10 @@
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/select.h>
#include <sys/time.h>
#include <signal.h>

View File

@ -498,11 +498,11 @@ ipmi_handle_pong(struct ipmi_intf * intf, struct ipmi_rs * rsp)
printf(" ASF Version %s\n"
" RMCP Version %s\n"
" RMCP Sequence %d\n"
" IANA Enterprise %ld\n\n",
" IANA Enterprise %lu\n\n",
(pong->sup_entities & 0x01) ? "1.0" : "unknown",
(pong->rmcp.ver == 6) ? "1.0" : "unknown",
pong->rmcp.seq,
ntohl(pong->iana));
(unsigned long)ntohl(pong->iana));
return (pong->sup_entities & 0x80) ? 1 : 0;
}