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:
Cary R 2011-10-31 15:40:06 -07:00 committed by Stephen Williams
parent 85faab8a08
commit 2fbe7434f2
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>
/*
@ -802,7 +803,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 '*'. */