Skip to content

Commit

Permalink
Fix a few warnings that came up after turning on a dozen more warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Joerg Mayer committed Apr 4, 2018
1 parent 8b005d1 commit 410721a
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gencode.c
Expand Up @@ -1735,7 +1735,7 @@ gen_load_a(compiler_state_t *cstate, enum e_offrel offrel, u_int offset,

default:
abort();
return NULL;
/* NOTREACHED */
}
return s;
}
Expand Down
2 changes: 1 addition & 1 deletion rpcap-protocol.c
Expand Up @@ -78,7 +78,7 @@
* error message is returned in the 'errbuf' variable.
*/
int
rpcap_senderror(SOCKET sock, uint8 ver, unsigned short errcode, char *error, char *errbuf)
rpcap_senderror(SOCKET sock, uint8 ver, unsigned short errcode, const char *error, char *errbuf)
{
char sendbuf[RPCAP_NETBUF_SIZE]; /* temporary buffer in which data to be sent is buffered */
int sendbufidx = 0; /* index which keeps the number of bytes currently buffered */
Expand Down
2 changes: 1 addition & 1 deletion rpcap-protocol.h
Expand Up @@ -445,6 +445,6 @@ struct rpcap_sampling

extern void rpcap_createhdr(struct rpcap_header *header, uint8 ver, uint8 type, uint16 value, uint32 length);
extern const char *rpcap_msg_type_string(uint8 type);
extern int rpcap_senderror(SOCKET sock, uint8 ver, uint16 errcode, char *error, char *errbuf);
extern int rpcap_senderror(SOCKET sock, uint8 ver, uint16 errcode, const char *error, char *errbuf);

#endif
2 changes: 1 addition & 1 deletion rpcapd/log-stderr.c
Expand Up @@ -30,7 +30,7 @@ rpcapd_log(log_priority priority, const char *message, ...)

default:
abort();
return;
/* NOTREACHED */
}

fprintf(stderr, "rpcapd: %s", tag);
Expand Down
2 changes: 1 addition & 1 deletion rpcapd/rpcapd.c
Expand Up @@ -114,7 +114,7 @@ static unsigned __stdcall main_passive_serviceloop_thread(void *ptr);
*/
static void printusage(void)
{
char *usagetext =
const char *usagetext =
"USAGE:"
" " PROGRAM_NAME " [-b <address>] [-p <port>] [-4] [-l <host_list>] [-a <host,port>]\n"
" [-n] [-v] [-d] "
Expand Down
2 changes: 1 addition & 1 deletion testprogs/selpolltest.c
Expand Up @@ -70,7 +70,7 @@ main(int argc, char **argv)
bpf_u_int32 localnet, netmask;
register char *cp, *cmdbuf, *device;
int doselect, dopoll, dotimeout, dononblock;
char *mechanism;
const char *mechanism;
struct bpf_program fcode;
char ebuf[PCAP_ERRBUF_SIZE];
pcap_if_t *devlist;
Expand Down
2 changes: 1 addition & 1 deletion testprogs/valgrindtest.c
Expand Up @@ -233,7 +233,7 @@ main(int argc, char **argv)
int dorfmon, useactivate;
char ebuf[PCAP_ERRBUF_SIZE];
char *infile;
char *cmdbuf;
const char *cmdbuf;
pcap_if_t *devlist;
pcap_t *pd;
int status = 0;
Expand Down

0 comments on commit 410721a

Please sign in to comment.