Use UINT_MAX instead of -1 to set unsigned to maximum value.
The Sun C compiler warns when -1 is used to initialize an unsigned.
(cherry picked from commit 7d588d699b)
This commit is contained in:
parent
85faab8a08
commit
2fbe7434f2
|
|
@ -28,6 +28,7 @@
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# include <math.h>
|
# include <math.h>
|
||||||
|
# include <limits.h>
|
||||||
# include <assert.h>
|
# include <assert.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -802,7 +803,7 @@ static int scan_format(vpiHandle callh, struct byte_source*src, vpiHandle argv,
|
||||||
* parse it generically first. */
|
* parse it generically first. */
|
||||||
|
|
||||||
unsigned suppress_flag = 0;
|
unsigned suppress_flag = 0;
|
||||||
unsigned max_width = -1;
|
unsigned max_width = UINT_MAX;
|
||||||
int code = 0;
|
int code = 0;
|
||||||
|
|
||||||
/* Look for the suppression character '*'. */
|
/* Look for the suppression character '*'. */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue