gnunet-svn
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]