]> granicus.if.org Git - curl/commitdiff
examples/httpcustomheader: Value stored to 'res' is never read
authorDaniel Stenberg <daniel@haxx.se>
Thu, 14 Feb 2019 10:50:12 +0000 (11:50 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 14 Feb 2019 22:30:43 +0000 (23:30 +0100)
Detected by scan-build

docs/examples/httpcustomheader.c

index d22b7bc5da68b14e4f8d6596759f981305b52388..6712f8c662118713a3b67b1eff547ab2fec48df7 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -49,7 +49,7 @@ int main(void)
     chunk = curl_slist_append(chunk, "X-silly-header;");
 
     /* set our custom set of headers */
-    res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
+    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
 
     curl_easy_setopt(curl, CURLOPT_URL, "localhost");
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);