From 17215002a16dafe48c4f8536c046839d56eabc86 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Fri, 12 Feb 2016 14:23:16 +0100 Subject: [PATCH] examples: fix compile warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes the following two warnings: examples/client.c:292:0: error: macro "MAX_OUTLEN" is not used [-Werror=unused-macros] examples/tiny-nghttpd.c:298:13: error: function declaration isn’t a prototype [-Werror=strict-prototypes] Caught using cmake as the autoconf check fails due to unused macros (HAVE_xxx in conftest.c) and a main function without parameters respectively. --- examples/client.c | 2 -- examples/tiny-nghttpd.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/client.c b/examples/client.c index 4280dd52..1976fa41 100644 --- a/examples/client.c +++ b/examples/client.c @@ -289,8 +289,6 @@ static int on_stream_close_callback(nghttp2_session *session, int32_t stream_id, return 0; } -#define MAX_OUTLEN 4096 - /* * The implementation of nghttp2_on_data_chunk_recv_callback type. We * use this function to print the received response body. diff --git a/examples/tiny-nghttpd.c b/examples/tiny-nghttpd.c index 6cb95694..0141663d 100644 --- a/examples/tiny-nghttpd.c +++ b/examples/tiny-nghttpd.c @@ -295,7 +295,7 @@ static size_t http_date(char *buf, time_t t) { static char date[29]; static size_t datelen; -static void update_date() { datelen = http_date(date, time(NULL)); } +static void update_date(void) { datelen = http_date(date, time(NULL)); } static size_t utos(char *buf, size_t len, uint64_t n) { size_t nwrite = 0;