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.
This commit is contained in:
parent
ff309fb04f
commit
7d588d699b
|
|
@ -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>
|
||||||
# include "ivl_alloc.h"
|
# include "ivl_alloc.h"
|
||||||
|
|
||||||
|
|
@ -803,7 +804,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