[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 128/208: tool_cb_wrt: fix variable shadowing warnin
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 128/208: tool_cb_wrt: fix variable shadowing warning |
Date: |
Wed, 09 Aug 2017 17:35:25 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.55.0
in repository gnurl.
commit f601f42787f583e033f2af1cd88ce785f6af08d1
Author: Marcel Raad <address@hidden>
AuthorDate: Sat Jul 8 11:43:51 2017 +0200
tool_cb_wrt: fix variable shadowing warning
GCC 4.4 complains:
tool_cb_wrt.c:81: error: declaration of ‘isatty’ shadows a global
declaration
/usr/include/unistd.h:782: error: shadowed declaration is here
Fix this by renaming the variable.
Closes https://github.com/curl/curl/pull/1661
---
src/tool_cb_wrt.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/tool_cb_wrt.c b/src/tool_cb_wrt.c
index ea52469b0..6716ba5cd 100644
--- a/src/tool_cb_wrt.c
+++ b/src/tool_cb_wrt.c
@@ -78,7 +78,7 @@ size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb,
void *userdata)
struct OutStruct *outs = userdata;
struct OperationConfig *config = outs->config;
size_t bytes = sz * nmemb;
- bool isatty = config->global->isatty;
+ bool is_tty = config->global->isatty;
/*
* Once that libcurl has called back tool_write_cb() the returned value
@@ -92,7 +92,7 @@ size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb,
void *userdata)
{
char *tty = curlx_getenv("CURL_ISATTY");
if(tty) {
- isatty = TRUE;
+ is_tty = TRUE;
curl_free(tty);
}
}
@@ -144,7 +144,7 @@ size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb,
void *userdata)
if(!outs->stream && !tool_create_output_file(outs))
return failure;
- if(isatty && (outs->bytes < 2000) && !config->terminal_binary_ok) {
+ if(is_tty && (outs->bytes < 2000) && !config->terminal_binary_ok) {
/* binary output to terminal? */
if(memchr(buffer, 0, bytes)) {
warnf(config->global, "Binary output can mess up your terminal. "
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 76/208: curl --socks5-{basic, gssapi}: control socks5 auth, (continued)
- [GNUnet-SVN] [gnurl] 76/208: curl --socks5-{basic, gssapi}: control socks5 auth, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 82/208: http2: handle PING frames, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 57/208: lib1521: fix missing-variable-declarations clang warnings, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 88/208: cmake: Added compatibility options for older Windows versions, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 100/208: smb: fix build for djgpp/MSDOS, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 105/208: TODO: HTTP proxy CONNECT is non-blocking now, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 91/208: url: make the original string get used on subsequent transfers, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 119/208: travis: do more tests in the coverage run, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 122/208: cmake: offer CMAKE_DEBUG_POSTFIX when building with MSVC, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 108/208: select.h: avoid macro redefinition harder, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 128/208: tool_cb_wrt: fix variable shadowing warning,
gnunet <=
- [GNUnet-SVN] [gnurl] 127/208: RELEASE-NOTES: synced with be2c999b8, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 109/208: cmake: if inet_pton is used, bump _WIN32_WINNT, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 25/208: tests: stabilize test 2032 and 2033, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 141/208: system.h: include winsock2.h before windows.h, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 46/208: mkhelp.pl: fix script name in usage text, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 124/208: travis: detect and use valgrind for normal builds, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 140/208: build: remove WIN32_LEAN_AND_MEAN from individual build systems, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 118/208: curl_easy_escape.3: mention the (lack of) encoding, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 134/208: make: fix docs build on OpenBSD, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 114/208: cmake: remove spurious "-l" from linker flags, gnunet, 2017/08/09