Quash a load of compile warnings
Kevin Lyda writes: I enclose the following patch which removes all but three of the warnings. i don't have any non-linux systems handy to test a fix to the round() function. but having it return a double should be fine. It doesn't actually fix anything, it just shuts up -Wall, so it's certainly an optional type of patch.
This commit is contained in:
parent
3a8f93792b
commit
2a30c56f03
10 changed files with 13 additions and 13 deletions
|
@ -358,7 +358,7 @@ read_from_socket(void *anything)
|
|||
int status;
|
||||
ReceiveBuffer msg;
|
||||
struct sockaddr_in his_addr;
|
||||
int his_addr_len;
|
||||
socklen_t his_addr_len;
|
||||
int flags;
|
||||
int message_length;
|
||||
unsigned long remote_ip;
|
||||
|
|
6
client.c
6
client.c
|
@ -146,7 +146,7 @@ read_line(void)
|
|||
static unsigned long
|
||||
get_address(const char *hostname)
|
||||
{
|
||||
unsigned char *address0;
|
||||
char *address0;
|
||||
struct hostent *host;
|
||||
unsigned long result;
|
||||
|
||||
|
@ -746,7 +746,7 @@ static int
|
|||
accheck_getaddr(char *line, unsigned long *addr)
|
||||
{
|
||||
unsigned long a, b, c, d, ip;
|
||||
unsigned char *p, *q;
|
||||
char *p, *q;
|
||||
p = line;
|
||||
while (*p && isspace(*p)) p++;
|
||||
if (!*p) {
|
||||
|
@ -1124,7 +1124,7 @@ static int
|
|||
submit_request(CMD_Request *request, CMD_Reply *reply, int *reply_auth_ok)
|
||||
{
|
||||
unsigned long tx_sequence;
|
||||
int where_from_len;
|
||||
socklen_t where_from_len;
|
||||
struct sockaddr_in where_from;
|
||||
int bad_length, bad_sender, bad_sequence, bad_header;
|
||||
int select_status;
|
||||
|
|
2
cmdmon.c
2
cmdmon.c
|
@ -1584,7 +1584,7 @@ read_from_cmd_socket(void *anything)
|
|||
CMD_Reply tx_message, *prev_tx_message;
|
||||
int rx_message_length, tx_message_length;
|
||||
struct sockaddr_in where_from;
|
||||
int from_length;
|
||||
socklen_t from_length;
|
||||
unsigned long remote_ip;
|
||||
unsigned short remote_port;
|
||||
int md5_ok;
|
||||
|
|
|
@ -116,7 +116,7 @@ LOG_Line_Function(LOG_Severity severity, LOG_Facility facility, const char *form
|
|||
|
||||
/* ================================================== */
|
||||
|
||||
volatile void
|
||||
void
|
||||
LOG_Fatal_Function(LOG_Facility facility, const char *format, ...)
|
||||
{
|
||||
char buf[2048];
|
||||
|
|
|
@ -77,7 +77,7 @@ extern void LOG_Finalise(void);
|
|||
extern void LOG_Line_Function(LOG_Severity severity, LOG_Facility facility, const char *format, ...);
|
||||
|
||||
/* Logging function for fatal errors */
|
||||
extern volatile void LOG_Fatal_Function(LOG_Facility facility, const char *format, ...);
|
||||
extern void LOG_Fatal_Function(LOG_Facility facility, const char *format, ...);
|
||||
|
||||
/* Position in code reporting function */
|
||||
extern void LOG_Position(const char *filename, int line_number, const char *function_name);
|
||||
|
|
2
main.c
2
main.c
|
@ -74,7 +74,7 @@ delete_pidfile(void)
|
|||
|
||||
/* ================================================== */
|
||||
|
||||
volatile void
|
||||
void
|
||||
MAI_CleanupAndExit(void)
|
||||
{
|
||||
if (!initialised) exit(0);
|
||||
|
|
2
main.h
2
main.h
|
@ -32,7 +32,7 @@
|
|||
#define GOT_MAIN_H
|
||||
|
||||
/* Function to clean up at end of run */
|
||||
extern volatile void MAI_CleanupAndExit(void);
|
||||
extern void MAI_CleanupAndExit(void);
|
||||
|
||||
#endif /* GOT_MAIN_H */
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ unsigned long
|
|||
DNS_Name2IPAddress(const char *name)
|
||||
{
|
||||
struct hostent *host;
|
||||
unsigned char *address0;
|
||||
char *address0;
|
||||
unsigned long result;
|
||||
|
||||
host = gethostbyname(name);
|
||||
|
|
|
@ -378,7 +378,7 @@ generate_packet_auth(NTP_Packet *pkt, unsigned long keyid)
|
|||
if (keyok) {
|
||||
pkt->auth_keyid = htonl(keyid);
|
||||
MD5Init(&ctx);
|
||||
MD5Update(&ctx, keytext, keylen);
|
||||
MD5Update(&ctx, (unsigned char *) keytext, keylen);
|
||||
MD5Update(&ctx, (unsigned char *) pkt, offsetof(NTP_Packet, auth_keyid));
|
||||
MD5Final(&ctx);
|
||||
memcpy(&(pkt->auth_data), &ctx.digest, 16);
|
||||
|
@ -447,7 +447,7 @@ check_packet_auth(NTP_Packet *pkt, unsigned long keyid)
|
|||
if (keyok) {
|
||||
pkt->auth_keyid = htonl(keyid);
|
||||
MD5Init(&ctx);
|
||||
MD5Update(&ctx, keytext, keylen);
|
||||
MD5Update(&ctx, (unsigned char *) keytext, keylen);
|
||||
MD5Update(&ctx, (unsigned char *) pkt, offsetof(NTP_Packet, auth_keyid));
|
||||
MD5Final(&ctx);
|
||||
if (!memcmp((void *) &ctx.digest, (void *) &(pkt->auth_data), 16)) {
|
||||
|
|
2
ntp_io.c
2
ntp_io.c
|
@ -184,7 +184,7 @@ read_from_socket(void *anything)
|
|||
ReceiveBuffer message;
|
||||
int message_length;
|
||||
struct sockaddr_in where_from;
|
||||
int from_length;
|
||||
socklen_t from_length;
|
||||
unsigned int flags = 0;
|
||||
struct timeval now;
|
||||
NTP_Remote_Address remote_addr;
|
||||
|
|
Loading…
Reference in a new issue