@@ -1880,8 +1880,8 @@ int freadMain(freadMainArgs _args) {
18801880 if (verbose ) DTPRINT (_ ("[07] Detect column types, dec, good nrow estimate and whether first row is column names\n" ));
18811881 if (verbose && args .header != NA_BOOL8 ) DTPRINT (_ (" 'header' changed by user from 'auto' to %s\n" ), args .header ?"true" :"false" );
18821882
1883- type = malloc (sizeof (* type ) * ( size_t ) ncol );
1884- tmpType = malloc (sizeof (* tmpType ) * ( size_t ) ncol ); // used i) in sampling to not stop on errors when bad jump point and ii) when accepting user overrides
1883+ type = malloc (sizeof (* type ) * ncol );
1884+ tmpType = malloc (sizeof (* tmpType ) * ncol ); // used i) in sampling to not stop on errors when bad jump point and ii) when accepting user overrides
18851885 if (!type || !tmpType ) {
18861886 free (type ); free (tmpType ); // # nocov
18871887 STOP (_ ("Failed to allocate 2 x %d bytes for type and tmpType: %s" ), ncol , strerror (errno )); // # nocov
@@ -2197,9 +2197,9 @@ int freadMain(freadMainArgs _args) {
21972197 rowSize1 = 0 ;
21982198 rowSize4 = 0 ;
21992199 rowSize8 = 0 ;
2200- size = malloc (sizeof (* size ) * ( size_t ) ncol ); // TODO: remove size[] when we implement Pasha's idea to += size inside processor
2200+ size = malloc (sizeof (* size ) * ncol ); // TODO: remove size[] when we implement Pasha's idea to += size inside processor
22012201 if (!size )
2202- STOP (_ ("Failed to allocate %d bytes for '%s': %s" ), (int )(sizeof (* size ) * ( size_t ) ncol ), "size" , strerror (errno )); // # nocov
2202+ STOP (_ ("Failed to allocate %d bytes for '%s': %s" ), (int )(sizeof (* size ) * ncol ), "size" , strerror (errno )); // # nocov
22032203 nStringCols = 0 ;
22042204 nNonStringCols = 0 ;
22052205 for (int j = 0 ; j < ncol ; j ++ ) {
@@ -2638,9 +2638,9 @@ int freadMain(freadMainArgs _args) {
26382638 DTPRINT (_ (" Provided number of fill columns: %d but only found %d\n" ), ncol , max_col );
26392639 DTPRINT (_ (" Dropping %d overallocated columns\n" ), ndropFill );
26402640 }
2641- dropFill = malloc (sizeof (* dropFill ) * ( size_t ) ndropFill );
2641+ dropFill = malloc (sizeof (* dropFill ) * ndropFill );
26422642 if (!dropFill )
2643- STOP (_ ("Failed to allocate %d bytes for '%s'." ), (int )(ndropFill * sizeof (int ) ), "dropFill" ); // # nocov
2643+ STOP (_ ("Failed to allocate %d bytes for '%s'." ), (int )(sizeof (* dropFill ) * ndropFill ), "dropFill" ); // # nocov
26442644 int i = 0 ;
26452645 for (int j = max_col ; j < ncol ; ++ j ) {
26462646 type [j ] = CT_DROP ;
0 commit comments