Skip to content

Commit

Permalink
warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdavidgraham committed Oct 21, 2013
1 parent aac799b commit 42bea8f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/in-binary.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,10 @@ parse_file(struct Output *out, const char *filename)
parse_banner3(out, buf, bytes_read);
break;
case 4:
fread(buf+bytes_read,1,1,fp);
if (fread(buf+bytes_read,1,1,fp) != 1) {
fprintf(stderr, "read() error\n");
exit(1);
}
bytes_read++;
parse_banner4(out, buf, bytes_read);
break;
Expand Down
6 changes: 3 additions & 3 deletions src/out-redis.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ clean_response_queue(struct Output *out, SOCKET fd)
static void
redis_out_open(struct Output *out, FILE *fp)
{
SOCKET fd = (SOCKET)fp;
ptrdiff_t fd = (ptrdiff_t)fp;
size_t count;
unsigned char line[1024];

Expand All @@ -173,7 +173,7 @@ redis_out_open(struct Output *out, FILE *fp)
static void
redis_out_close(struct Output *out, FILE *fp)
{
SOCKET fd = (SOCKET)fp;
ptrdiff_t fd = (ptrdiff_t)fp;
size_t count;
unsigned char line[1024];

Expand All @@ -198,7 +198,7 @@ static void
redis_out_status(struct Output *out, FILE *fp, time_t timestamp,
int status, unsigned ip, unsigned port, unsigned reason, unsigned ttl)
{
SOCKET fd = (SOCKET)fp;
ptrdiff_t fd = (ptrdiff_t)fp;
char line[1024];
char ip_string[16];
char port_string[10];
Expand Down

0 comments on commit 42bea8f

Please sign in to comment.