]> granicus.if.org Git - curl/commitdiff
http: fix build warning under LLVM
authorNick Zitzmann <nickzman@gmail.com>
Sat, 7 Sep 2013 15:00:11 +0000 (10:00 -0500)
committerNick Zitzmann <nickzman@gmail.com>
Sat, 7 Sep 2013 15:00:11 +0000 (10:00 -0500)
When building the code using LLVM Clang without NGHTTP2, I was getting
this warning:
../lib/http.h:155:1: warning: empty struct is a GNU extension [-Wgnu]
Placing a dummy variable into the data structure silenced the warning.

lib/http.h

index b0b37b6ae356d9d2177b639edf05b6d4d4397a87..a506238a66c0a358a2c2b07df9e4c3dcec1d72f7 100644 (file)
@@ -151,6 +151,8 @@ struct HTTP {
 struct http_conn {
 #ifdef USE_NGHTTP2
   nghttp2_session *h2;
+#else
+  int unused; /* prevent a compiler warning */
 #endif
 };