mirror of https://github.com/ecmwf/eccodes.git
C++ compilation
This commit is contained in:
parent
bed7e91e6b
commit
7468e8b15f
|
@ -159,8 +159,8 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
|
|||
num_bytes = (numberOfPoints + 1) * sizeof(double);
|
||||
data_values = (double*)calloc(numberOfPoints + 1, sizeof(double));
|
||||
if (!data_values) {
|
||||
fprintf(stderr, "ERROR: Failed to allocate %ld bytes for data values (number of points=%ld)\n",
|
||||
(long)num_bytes, numberOfPoints);
|
||||
fprintf(stderr, "ERROR: Failed to allocate %zu bytes for data values (number of points=%ld)\n",
|
||||
num_bytes, numberOfPoints);
|
||||
exit(GRIB_OUT_OF_MEMORY);
|
||||
}
|
||||
|
||||
|
@ -183,7 +183,7 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
|
|||
}
|
||||
if (size != (size_t)numberOfPoints) {
|
||||
if (!grib_options_on("q"))
|
||||
fprintf(stderr, "ERROR: Wrong number of points %d\n", (int)numberOfPoints);
|
||||
fprintf(stderr, "ERROR: Wrong number of points %ld\n", numberOfPoints);
|
||||
if (grib_options_on("f"))
|
||||
exit(1);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue