mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-28 12:30:58 +00:00
Compile examples with -Werror
PUBLISHED_FROM=5a24bda9029db3fc7bf04dc871656d65d551f4ab
This commit is contained in:
1 parent
6572c1c692
commit
447bf4adb0
3 files changed
+6
-4
No files matched your search
@@ -1,5 +1,5 @@
|
||||
SOURCES = $(PROG).c ../../mongoose.c
|
||||
CFLAGS = -g -W -Wall -I../.. -Wno-unused-function $(CFLAGS_EXTRA) $(MODULE_CFLAGS)
|
||||
CFLAGS = -g -W -Wall -Werror -I../.. -Wno-unused-function $(CFLAGS_EXTRA) $(MODULE_CFLAGS)
|
||||
|
||||
all: $(PROG)
|
||||
|
||||
|
||||
@@ -20,9 +20,10 @@
|
||||
|
||||
static void *stdin_thread(void *param) {
|
||||
int ch, sock = *(int *) param;
|
||||
// Forward all types characters to the socketpair
|
||||
while ((ch = getchar()) != EOF) {
|
||||
unsigned char c = (unsigned char) ch;
|
||||
send(sock, &c, 1, 0); // Forward all types characters to the socketpair
|
||||
send(sock, (const char *) &c, 1, 0);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -75,7 +76,7 @@ int main(int argc, char *argv[]) {
|
||||
fprintf(stderr, "Usage: %s <port> <client|server>\n", argv[0]);
|
||||
exit(EXIT_FAILURE);
|
||||
} else if (strcmp(argv[2], "client") == 0) {
|
||||
int fds[2];
|
||||
sock_t fds[2];
|
||||
struct mg_connection *ioconn, *server_conn;
|
||||
|
||||
mg_mgr_init(&mgr, NULL);
|
||||
|
||||
Reference in new issue
Block a user