@@ -1879,8 +1879,8 @@ int freadMain(freadMainArgs _args) {
18791879 if (verbose ) DTPRINT (_ ("[07] Detect column types, dec, good nrow estimate and whether first row is column names\n" ));
18801880 if (verbose && args .header != NA_BOOL8 ) DTPRINT (_ (" 'header' changed by user from 'auto' to %s\n" ), args .header ?"true" :"false" );
18811881
1882- type = malloc (sizeof (* type ) * ( size_t ) ncol );
1883- 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
1882+ type = malloc (sizeof (* type ) * ncol );
1883+ tmpType = malloc (sizeof (* tmpType ) * ncol ); // used i) in sampling to not stop on errors when bad jump point and ii) when accepting user overrides
18841884 if (!type || !tmpType ) {
18851885 free (type ); free (tmpType ); // # nocov
18861886 STOP (_ ("Failed to allocate 2 x %d bytes for type and tmpType: %s" ), ncol , strerror (errno )); // # nocov
@@ -2196,9 +2196,9 @@ int freadMain(freadMainArgs _args) {
21962196 rowSize1 = 0 ;
21972197 rowSize4 = 0 ;
21982198 rowSize8 = 0 ;
2199- size = malloc (sizeof (* size ) * ( size_t ) ncol ); // TODO: remove size[] when we implement Pasha's idea to += size inside processor
2199+ size = malloc (sizeof (* size ) * ncol ); // TODO: remove size[] when we implement Pasha's idea to += size inside processor
22002200 if (!size )
2201- STOP (_ ("Failed to allocate %d bytes for '%s': %s" ), (int )(sizeof (* size ) * ( size_t ) ncol ), "size" , strerror (errno )); // # nocov
2201+ STOP (_ ("Failed to allocate %d bytes for '%s': %s" ), (int )(sizeof (* size ) * ncol ), "size" , strerror (errno )); // # nocov
22022202 nStringCols = 0 ;
22032203 nNonStringCols = 0 ;
22042204 for (int j = 0 ; j < ncol ; j ++ ) {
@@ -2637,9 +2637,9 @@ int freadMain(freadMainArgs _args) {
26372637 DTPRINT (_ (" Provided number of fill columns: %d but only found %d\n" ), ncol , max_col );
26382638 DTPRINT (_ (" Dropping %d overallocated columns\n" ), ndropFill );
26392639 }
2640- dropFill = malloc (sizeof (* dropFill ) * ( size_t ) ndropFill );
2640+ dropFill = malloc (sizeof (* dropFill ) * ndropFill );
26412641 if (!dropFill )
2642- STOP (_ ("Failed to allocate %d bytes for '%s'." ), (int )(ndropFill * sizeof (int ) ), "dropFill" ); // # nocov
2642+ STOP (_ ("Failed to allocate %d bytes for '%s'." ), (int )(sizeof (* dropFill ) * ndropFill ), "dropFill" ); // # nocov
26432643 int i = 0 ;
26442644 for (int j = max_col ; j < ncol ; ++ j ) {
26452645 type [j ] = CT_DROP ;
0 commit comments