]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
httpput-postfields.c: shorten string for C89 compliance
authorDaniel Stenberg <daniel@haxx.se>
Wed, 21 Sep 2022 07:32:12 +0000 (09:32 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 21 Sep 2022 07:59:40 +0000 (09:59 +0200)
httpput-postfields.c:41:3: error: string length ‘522’ is greater than the length ‘509’ ISO C90 compilers are required to support [-Woverlength-strings]
   41 |   "this chapter.";
      |   ^~~~~~~~~~~~~~~

Closes #9555

docs/examples/httpput-postfields.c

index 7c85a01e578a0f0c6f65ebaebfaf25e299c0bd67..f8a5c43a68fed0431f3093a4043c4bbd58cabb36 100644 (file)
@@ -37,8 +37,10 @@ static const char olivertwist[]=
   "small: to wit, a workhouse; and in this workhouse was born; on a day and "
   "date which I need not trouble myself to repeat, inasmuch as it can be of "
   "no possible consequence to the reader, in this stage of the business at "
-  "all events; the item of mortality whose name is prefixed to the head of "
-  "this chapter.";
+  "all events; the item of mortality whose name is prefixed";
+
+/* ... to the head of this chapter. String cut off to stick within the C90
+   509 byte limit. */
 
 /*
  * This example shows a HTTP PUT operation that sends a fixed buffer with