From: Frank Mori Hess Date: Wed, 18 Apr 2007 14:04:39 +0000 (+0000) Subject: Fixed compile warning under gcc 4.1.2 X-Git-Tag: v0_8_0~34 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c80870a4a6bc9d424943e9dd263288cb1d9926c0;p=comedilib.git Fixed compile warning under gcc 4.1.2 --- diff --git a/lib/calib_yacc.y b/lib/calib_yacc.y index b51ff37..ede8e99 100644 --- a/lib/calib_yacc.y +++ b/lib/calib_yacc.y @@ -137,13 +137,13 @@ static comedi_calibration_setting_t* current_setting( calib_yyparse_private_t *p static int add_channel( calib_yyparse_private_t *priv, int channel ) { - int *temp; + unsigned *temp; comedi_calibration_setting_t *setting; setting = current_setting( priv ); if( setting == NULL ) return -1; - temp = realloc( setting->channels, ( setting->num_channels + 1 ) * sizeof( int ) ); + temp = realloc( setting->channels, ( setting->num_channels + 1 ) * sizeof(unsigned) ); if( temp == NULL ) { fprintf(stderr, "%s: realloc failed to allocate memory.\n", __FUNCTION__); @@ -156,13 +156,13 @@ static int add_channel( calib_yyparse_private_t *priv, int channel ) static int add_range( calib_yyparse_private_t *priv, int range ) { - int *temp; + unsigned *temp; comedi_calibration_setting_t *setting; setting = current_setting( priv ); if( setting == NULL ) return -1; - temp = realloc( setting->ranges, ( setting->num_ranges + 1 ) * sizeof( int ) ); + temp = realloc( setting->ranges, ( setting->num_ranges + 1 ) * sizeof(unsigned) ); if( temp == NULL ) { fprintf(stderr, "%s: realloc failed to allocate memory.\n", __FUNCTION__);