Skip to content

Commit

Permalink
Make the examples build without warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nmathewson committed Feb 2, 2010
1 parent 9055cd0 commit 6f89afc
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Ref2_eventbase.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ last element in the array is NULL.
[code,C]
--------
int i;
const char **methods;
const char **methods = event_get_supported_methods();
printf("Starting Libevent %s. Available methods are:\n",
event_get_version());
for (i=0; methods[i] != NULL; ++i) {
Expand Down
2 changes: 1 addition & 1 deletion Ref4_event.txt
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ int add_reader(struct reader *r, struct event_base *b)
struct event *ev = READER_EVENT_PTR(r);
if (!event_initialized(ev))
event_assign(ev, b, r->fd, EV_READ, readcb, r);
event_add(ev, NULL);
return event_add(ev, NULL);
}
-----

Expand Down
2 changes: 1 addition & 1 deletion Ref6_bufferevent.txt
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ void event_callback(struct bufferevent *bev, short events, void *ctx)

struct bufferevent *setup_bufferevent(void)
{
struct bufferevent *b1;
struct bufferevent *b1 = NULL;
struct info *info1;

info1 = malloc(sizeof(struct info));
Expand Down
1 change: 1 addition & 0 deletions example_stubs/sec01.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <sys/select.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/socket.h>

int fd[1000];
int n_sockets=1000;
Expand Down
2 changes: 0 additions & 2 deletions examples_01/01_rot13_server_forking.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ child(int fd)
continue;
}
}

free(outbuf);
}

void
Expand Down

0 comments on commit 6f89afc

Please sign in to comment.