[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 10/254: lib: fix maybe-uninitialized warnings
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 10/254: lib: fix maybe-uninitialized warnings |
Date: |
Sat, 17 Jun 2017 16:50:42 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.54.1
in repository gnurl.
commit 4a8cf6c4044a1692b441b64a52d1750a92b798ee
Author: Marcel Raad <address@hidden>
AuthorDate: Sat Apr 22 22:12:37 2017 +0200
lib: fix maybe-uninitialized warnings
With -Og, GCC complains:
easy.c:628:7: error: ‘mcode’ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
../lib/strcase.h:35:29: error: ‘tok_buf’ may be used uninitialized in this
function [-Werror=maybe-uninitialized]
vauth/digest.c:208:9: note: ‘tok_buf’ was declared here
../lib/strcase.h:35:29: error: ‘tok_buf’ may be used uninitialized in this
function [-Werror=maybe-uninitialized]
vauth/digest.c:566:15: note: ‘tok_buf’ was declared here
Fix this by initializing the variables.
---
lib/easy.c | 2 +-
lib/vauth/digest.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/easy.c b/lib/easy.c
index 2b5f972e1..5189d0794 100644
--- a/lib/easy.c
+++ b/lib/easy.c
@@ -561,7 +561,7 @@ static void events_setup(struct Curl_multi *multi, struct
events *ev)
static CURLcode wait_or_timeout(struct Curl_multi *multi, struct events *ev)
{
bool done = FALSE;
- CURLMcode mcode;
+ CURLMcode mcode = CURLM_OK;
CURLcode result = CURLE_OK;
while(!done) {
diff --git a/lib/vauth/digest.c b/lib/vauth/digest.c
index 31d25cfa1..268474c78 100644
--- a/lib/vauth/digest.c
+++ b/lib/vauth/digest.c
@@ -205,7 +205,7 @@ static CURLcode auth_digest_get_qop_values(const char
*options, int *value)
{
char *tmp;
char *token;
- char *tok_buf;
+ char *tok_buf = NULL;
/* Initialise the output */
*value = 0;
@@ -563,7 +563,7 @@ CURLcode Curl_auth_decode_digest_http_message(const char
*chlg,
return CURLE_OUT_OF_MEMORY;
}
else if(strcasecompare(value, "qop")) {
- char *tok_buf;
+ char *tok_buf = NULL;
/* Tokenize the list and choose auth if possible, use a temporary
clone of the buffer since strtok_r() ruins it */
tmp = strdup(content);
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 40/254: curl_rtmp: fix missing-variable-declarations warnings, (continued)
- [GNUnet-SVN] [gnurl] 40/254: curl_rtmp: fix missing-variable-declarations warnings, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 49/254: getpart: use correct variable type, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 13/254: llist: fix a comment after cbae73e1dd9, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 11/254: multi: clarify condition in curl_multi_wait, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 08/254: llist: no longer uses malloc, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 66/254: krb5: use private buffer for temp string, not receive buffer, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 22/254: curl: set a 100K buffer size by default, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 34/254: http-proxy: removed unused argument in CURL_DISABLE_PROXY case, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 06/254: mbedtls: enable NTLM (& SMB) even if MD4 support is unavailable, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 20/254: configure: stop prepending to LDFLAGS, CPPFLAGS, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 10/254: lib: fix maybe-uninitialized warnings,
gnunet <=
- [GNUnet-SVN] [gnurl] 14/254: configure: fix the -ldl check for openssl, add -lpthread check, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 17/254: nss: adapt to the new Curl_llist API, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 35/254: test1443: test --remote-time, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 12/254: schannel: Don't treat encrypted partial record as pending data, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 58/254: http: don't clobber the receive buffer for timecond, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 15/254: RELEASE-NOTES: synced with c68fed875, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 16/254: curl-compilers.m4: accept -Og and -Ofast GCC flags, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 19/254: if2ip: fix -Wcast-align warning, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 53/254: http: use private user:password output buffer, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 07/254: typecheck-gcc: handle function pointers properly, gnunet, 2017/06/17