mirror of
https://github.com/curl/curl.git
synced 2024-12-15 06:40:09 +08:00
lib1521: fix compiler warnings on the use of bad 'long' values
Reported-by: Marcel Raad
Bug: cccac4fb2b (commitcomment-22453387)
This commit is contained in:
parent
844896d064
commit
b94a2cdfe6
@ -20,8 +20,8 @@
|
|||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
/* This source code is generated by mk-lib1521.pl ! */
|
/* This source code is generated by mk-lib1521.pl ! */
|
||||||
|
|
||||||
@ -29,8 +29,8 @@ struct data {
|
|||||||
char *blaha;
|
char *blaha;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define LO -2147483647
|
#define LO LONG_MIN
|
||||||
#define HI 2147483648
|
#define HI LONG_MAX
|
||||||
#define OFF_VAL (curl_off_t) 3123123123
|
#define OFF_VAL (curl_off_t) 3123123123
|
||||||
#define OFF_LO (curl_off_t) LO
|
#define OFF_LO (curl_off_t) LO
|
||||||
#define OFF_HI (curl_off_t) HI
|
#define OFF_HI (curl_off_t) HI
|
||||||
|
@ -24,9 +24,9 @@
|
|||||||
# Usage:
|
# Usage:
|
||||||
# cat ../../include/curl/curl.h | perl mk-lib1521.pl > lib1521.c
|
# cat ../../include/curl/curl.h | perl mk-lib1521.pl > lib1521.c
|
||||||
|
|
||||||
# minimum and maximum 32 signed values
|
# minimum and maximum long signed values
|
||||||
my $minlong = - (1<<31)+1;
|
my $minlong = "LONG_MIN";
|
||||||
my $maxlong = (1<<31);
|
my $maxlong = "LONG_MAX";
|
||||||
|
|
||||||
print <<HEADER
|
print <<HEADER
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
@ -51,8 +51,8 @@ print <<HEADER
|
|||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
/* This source code is generated by mk-lib1521.pl ! */
|
/* This source code is generated by mk-lib1521.pl ! */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user