[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 216/264: src: Remove C99 constructs to ensure C89 compliance
From: |
gnunet |
Subject: |
[gnurl] 216/264: src: Remove C99 constructs to ensure C89 compliance |
Date: |
Thu, 30 Apr 2020 16:08:39 +0200 |
This is an automated email from the git hooks/post-receive script.
nikita pushed a commit to branch master
in repository gnurl.
commit 207a6cbb909ba6df01ba5ed8f73acc733128bdf1
Author: Tom <address@hidden>
AuthorDate: Fri Apr 17 17:53:40 2020 +0300
src: Remove C99 constructs to ensure C89 compliance
This fixes the error: 'for' loop initial declaration used outside C99
mode by declaring the loop increment variable in the beginning of the
block instead of inside the for loop.
Fixes #5254
Reviewed-by: Daniel Gustafsson <address@hidden>
---
docs/examples/crawler.c | 5 +++--
tests/unit/unit1655.c | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/docs/examples/crawler.c b/docs/examples/crawler.c
index 7ddfb81bf..59de99d7a 100644
--- a/docs/examples/crawler.c
+++ b/docs/examples/crawler.c
@@ -6,7 +6,7 @@
* \___|\___/|_| \_\_____|
*
* Web crawler based on curl and libxml2.
- * Copyright (C) 2018 - 2019 Jeroen Ooms <address@hidden>
+ * Copyright (C) 2018 - 2020 Jeroen Ooms <address@hidden>
* License: MIT
*
* To compile:
@@ -116,7 +116,8 @@ size_t follow_links(CURLM *multi_handle, memory *mem, char
*url)
return 0;
}
size_t count = 0;
- for(int i = 0; i < nodeset->nodeNr; i++) {
+ int i;
+ for(i = 0; i < nodeset->nodeNr; i++) {
double r = rand();
int x = r * nodeset->nodeNr / RAND_MAX;
const xmlNode *node = nodeset->nodeTab[x]->xmlChildrenNode;
diff --git a/tests/unit/unit1655.c b/tests/unit/unit1655.c
index a06b23a76..1b910ed9f 100644
--- a/tests/unit/unit1655.c
+++ b/tests/unit/unit1655.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 2019, Daniel Stenberg, <address@hidden>, et al.
+ * Copyright (C) 2019 - 2020, Daniel Stenberg, <address@hidden>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -75,6 +75,7 @@ do {
"this.is.an.otherwise-valid.hostname."
"with-a-label-of-greater-length-than-the-sixty-three-characters-"
"specified.in.the.RFCs.";
+ int i;
struct test {
const char *name;
@@ -96,7 +97,7 @@ do {
{ max, DOH_OK } /* expect buffer overwrite */
};
- for(int i = 0; i < (int)(sizeof(playlist)/sizeof(*playlist)); i++) {
+ for(i = 0; i < (int)(sizeof(playlist)/sizeof(*playlist)); i++) {
const char *name = playlist[i].name;
size_t olen = 100000;
struct demo victim;
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 242/264: transfer: Switch PUT to GET/HEAD on 303 redirect, (continued)
- [gnurl] 242/264: transfer: Switch PUT to GET/HEAD on 303 redirect, gnunet, 2020/04/30
- [gnurl] 238/264: curl.h: update comment typo, gnunet, 2020/04/30
- [gnurl] 237/264: GnuTLS: Don't skip really long certificate fields, gnunet, 2020/04/30
- [gnurl] 239/264: RELEASE-NOTES: synced, gnunet, 2020/04/30
- [gnurl] 203/264: sockfilt: tidy variable naming and data structure in select_ws, gnunet, 2020/04/30
- [gnurl] 204/264: tests: run the sws server on "any port", gnunet, 2020/04/30
- [gnurl] 194/264: cmake: Avoid MSVC C4273 warnings in send/recv checks, gnunet, 2020/04/30
- [gnurl] 195/264: docs/MQTT: replace confusing 80 by 75, gnunet, 2020/04/30
- [gnurl] 193/264: KNOWN_BUGS: Add entry 'Blocking socket operations', gnunet, 2020/04/30
- [gnurl] 215/264: runtests: dummy init the ports variables to avoid warnings, gnunet, 2020/04/30
- [gnurl] 216/264: src: Remove C99 constructs to ensure C89 compliance,
gnunet <=
- [gnurl] 252/264: smtp: set auth correctly, gnunet, 2020/04/30
- [gnurl] 250/264: libssh: avoid options override by configuration files, gnunet, 2020/04/30
- [gnurl] 191/264: sockfilt: fix broken pipe on Windows to be ready in select_ws, gnunet, 2020/04/30
- [gnurl] 224/264: mqtt: improve the state machine, gnunet, 2020/04/30
- [gnurl] 219/264: add more alt-svc test coverage, gnunet, 2020/04/30
- [gnurl] 218/264: test1247: use http server to get the port number set, gnunet, 2020/04/30
- [gnurl] 246/264: tests: make runtests check that disabled tests exists, gnunet, 2020/04/30
- [gnurl] 200/264: mqttd: s/errno/SOCKERRNO, gnunet, 2020/04/30
- [gnurl] 201/264: appveyor: add Unicode winbuild jobs, gnunet, 2020/04/30
- [gnurl] 199/264: buildconf: use find -execdir instead, remove -print and the ares files, gnunet, 2020/04/30