[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 180/222: examples/sslbackend: fix -Wchar-subscripts warning
From: |
gnunet |
Subject: |
[gnurl] 180/222: examples/sslbackend: fix -Wchar-subscripts warning |
Date: |
Thu, 07 Nov 2019 00:11:16 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 650677461fb95481f02a55f02c356b0d6ce2de52
Author: Marcel Raad <address@hidden>
AuthorDate: Fri Oct 18 08:19:47 2019 +0200
examples/sslbackend: fix -Wchar-subscripts warning
With the `isdigit` implementation that comes with MSYS2, the argument
is used as an array subscript, resulting in a -Wchar-subscripts
warning. `isdigit`'s behavior is undefined if the argument is negative
and not EOF [0]. As done in lib/curl_ctype.h, cast the `char` variable
to `unsigned char` to avoid that.
[0] https://en.cppreference.com/w/c/string/byte/isdigit
Closes https://github.com/curl/curl/pull/4503
---
docs/examples/sslbackend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/examples/sslbackend.c b/docs/examples/sslbackend.c
index c1489a9aa..bbfa81738 100644
--- a/docs/examples/sslbackend.c
+++ b/docs/examples/sslbackend.c
@@ -56,7 +56,7 @@ int main(int argc, char **argv)
return 0;
}
- else if(isdigit(*name)) {
+ else if(isdigit((int)(unsigned char)*name)) {
int id = atoi(name);
result = curl_global_sslset((curl_sslbackend)id, NULL, NULL);
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 168/222: TODO: Handle growing SFTP files, (continued)
- [gnurl] 168/222: TODO: Handle growing SFTP files, gnunet, 2019/11/06
- [gnurl] 189/222: tests: add missing proxy features, gnunet, 2019/11/06
- [gnurl] 177/222: RELEASE-NOTES: synced, gnunet, 2019/11/06
- [gnurl] 181/222: travis: Add an ARM64 build, gnunet, 2019/11/06
- [gnurl] 182/222: http2: expire a timeout at end of stream, gnunet, 2019/11/06
- [gnurl] 187/222: tests: use %FILE_PWD for file:// URLs, gnunet, 2019/11/06
- [gnurl] 192/222: test1591: fix spelling of http feature, gnunet, 2019/11/06
- [gnurl] 193/222: schannel: reverse the order of certinfo insertions, gnunet, 2019/11/06
- [gnurl] 199/222: HTTP3: fix typo somehere1 > somewhere1, gnunet, 2019/11/06
- [gnurl] 188/222: RELEASE-NOTES: synced, gnunet, 2019/11/06
- [gnurl] 180/222: examples/sslbackend: fix -Wchar-subscripts warning,
gnunet <=
- [gnurl] 197/222: RELEASE-NOTES: synced, gnunet, 2019/11/06
- [gnurl] 203/222: url: make Curl_close() NULLify the pointer too, gnunet, 2019/11/06
- [gnurl] 205/222: gtls: make gnutls_bye() not wait for response on shutdown, gnunet, 2019/11/06
- [gnurl] 207/222: mbedtls: add error message for cert validity starting in the future, gnunet, 2019/11/06
- [gnurl] 210/222: configure: only say ipv6 enabled when the variable is set, gnunet, 2019/11/06
- [gnurl] 216/222: awk, gnunet, 2019/11/06
- [gnurl] 161/222: asyn-thread: make use of Curl_socketpair() where available, gnunet, 2019/11/06
- [gnurl] 174/222: url: normalize CURLINFO_EFFECTIVE_URL, gnunet, 2019/11/06
- [gnurl] 167/222: KNOWN_BUGS: remove "CURLFORM_CONTENTLEN in an array", gnunet, 2019/11/06
- [gnurl] 190/222: conn-reuse: requests wanting NTLM can reuse non-NTLM connections, gnunet, 2019/11/06