[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 242/254: lib1521: fix compiler warnings on the use
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 242/254: lib1521: fix compiler warnings on the use of bad 'long' values |
Date: |
Sat, 17 Jun 2017 16:54:34 +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 b94a2cdfe641a9094a2352f3f38b02ead3ffe8d5
Author: Daniel Stenberg <address@hidden>
AuthorDate: Fri Jun 9 01:02:12 2017 +0200
lib1521: fix compiler warnings on the use of bad 'long' values
Reported-by: Marcel Raad
Bug:
https://github.com/curl/curl/commit/cccac4fb2b20d6ed87da7978408c3ecacc464fe4#commitcomment-22453387
---
tests/libtest/lib1521.c | 6 +++---
tests/libtest/mk-lib1521.pl | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/libtest/lib1521.c b/tests/libtest/lib1521.c
index 367680198..dee85a238 100644
--- a/tests/libtest/lib1521.c
+++ b/tests/libtest/lib1521.c
@@ -20,8 +20,8 @@
*
***************************************************************************/
#include "test.h"
-
#include "memdebug.h"
+#include <limits.h>
/* This source code is generated by mk-lib1521.pl ! */
@@ -29,8 +29,8 @@ struct data {
char *blaha;
};
-#define LO -2147483647
-#define HI 2147483648
+#define LO LONG_MIN
+#define HI LONG_MAX
#define OFF_VAL (curl_off_t) 3123123123
#define OFF_LO (curl_off_t) LO
#define OFF_HI (curl_off_t) HI
diff --git a/tests/libtest/mk-lib1521.pl b/tests/libtest/mk-lib1521.pl
index 9cd03b37c..b1eaba8d8 100644
--- a/tests/libtest/mk-lib1521.pl
+++ b/tests/libtest/mk-lib1521.pl
@@ -24,9 +24,9 @@
# Usage:
# cat ../../include/curl/curl.h | perl mk-lib1521.pl > lib1521.c
-# minimum and maximum 32 signed values
-my $minlong = - (1<<31)+1;
-my $maxlong = (1<<31);
+# minimum and maximum long signed values
+my $minlong = "LONG_MIN";
+my $maxlong = "LONG_MAX";
print <<HEADER
/***************************************************************************
@@ -51,8 +51,8 @@ print <<HEADER
*
***************************************************************************/
#include "test.h"
-
#include "memdebug.h"
+#include <limits.h>
/* This source code is generated by mk-lib1521.pl ! */
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 159/254: cmake: remove unused variables: GNUTLS_ENABLED, NSS_ENABLED, (continued)
- [GNUnet-SVN] [gnurl] 159/254: cmake: remove unused variables: GNUTLS_ENABLED, NSS_ENABLED, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 173/254: TODO: 6.4 is done, send telnet data in chunks, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 221/254: BINDINGS: add Ring binding, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 216/254: x509asn1: fix implicit-fallthrough warning with GCC 7, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 179/254: mbedtls: fix variable shadow warning, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 246/254: FindWin32CACert: Use a temporary buffer on the stack, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 232/254: README.md: show the coverall coverage on github, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 106/254: tool_parsecfg: fix -Wcast-qual warning, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 64/254: unit1606: do not print/access buffer, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 135/254: tests: added missing keywords "chunked Transfer-Encoding", gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 242/254: lib1521: fix compiler warnings on the use of bad 'long' values,
gnunet <=
- [GNUnet-SVN] [gnurl] 60/254: pingpong: use the set buffer size, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 236/254: configure: fix link with librtmp when specifying path, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 127/254: formdata: fix -Wcomma warning, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 147/254: oauth2-bearer.d: mention the <token> argument, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 122/254: tests: removed redundant --trace-ascii arguments, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 174/254: runtests.pl: removed unused arguments to valgrindparse, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 128/254: cookie_interface: fix -Wcomma warning, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 123/254: tests: make test file names more unique, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 116/254: rand: treat fake entropy the same regardless of endianness, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 161/254: memdebug: fix compilation failure, gnunet, 2017/06/17