Fixed compile warning under gcc 4.1.2
authorFrank Mori Hess <fmhess@speakeasy.net>
Wed, 18 Apr 2007 14:04:39 +0000 (14:04 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Wed, 18 Apr 2007 14:04:39 +0000 (14:04 +0000)
lib/calib_yacc.y

index b51ff37131a57b99eab7b999fa4156f2ad9a7e38..ede8e99073823e3e7c55db59ca9fcf5d6546e186 100644 (file)
@@ -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__);