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:
Cary R 2011-10-31 15:40:06 -07:00 committed by Stephen Williams
parent ff309fb04f
commit 7d588d699b
1 changed files with 2 additions and 1 deletions

View File

@ -28,6 +28,7 @@
# include <stdio.h>
# include <stdlib.h>
# include <math.h>
# include <limits.h>
# include <assert.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. */
unsigned suppress_flag = 0;
unsigned max_width = -1;
unsigned max_width = UINT_MAX;
int code = 0;
/* Look for the suppression character '*'. */