mirror of https://github.com/ecmwf/eccodes.git
Compiler warnings: Intel
This commit is contained in:
parent
4945aea553
commit
2c18053bbf
|
@ -106,11 +106,10 @@ void grib_tool_print_key_values(grib_runtime_options* options,grib_handle* h)
|
|||
|
||||
int grib_tool_finalise_action(grib_runtime_options* options)
|
||||
{
|
||||
grib_index_key* keys;
|
||||
grib_index_key* the_keys;
|
||||
grib_string_list* values;
|
||||
int first;
|
||||
|
||||
|
||||
if (compress_index) {
|
||||
grib_index_compress(idx);
|
||||
}
|
||||
|
@ -118,18 +117,18 @@ int grib_tool_finalise_action(grib_runtime_options* options)
|
|||
grib_tool_name,options->outfile->name);
|
||||
printf("--- ");
|
||||
first=1;
|
||||
keys=idx->keys;
|
||||
while (keys) {
|
||||
the_keys=idx->keys;
|
||||
while (the_keys) {
|
||||
if (!first) printf(", ");
|
||||
printf("%s",keys->name);
|
||||
keys=keys->next;
|
||||
printf("%s",the_keys->name);
|
||||
the_keys=the_keys->next;
|
||||
first=0;
|
||||
}
|
||||
printf("\n");
|
||||
keys=idx->keys;
|
||||
while (keys) {
|
||||
printf("--- %s = { ",keys->name);
|
||||
values=keys->values;
|
||||
the_keys=idx->keys;
|
||||
while (the_keys) {
|
||||
printf("--- %s = { ",the_keys->name);
|
||||
values=the_keys->values;
|
||||
first=1;
|
||||
while (values) {
|
||||
if (!first) printf(", ");
|
||||
|
@ -138,7 +137,7 @@ int grib_tool_finalise_action(grib_runtime_options* options)
|
|||
values=values->next;
|
||||
}
|
||||
printf(" }\n");
|
||||
keys=keys->next;
|
||||
the_keys=the_keys->next;
|
||||
}
|
||||
printf("--- %d messages indexed\n",idx->count);
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include "grib_api_internal.h"
|
||||
|
||||
void usage(const char* prog)
|
||||
static void usage(const char* prog)
|
||||
{
|
||||
printf("usage: %s [-v] infile1 infile2 ... \n",prog);
|
||||
exit(1);
|
||||
|
|
|
@ -10,7 +10,10 @@
|
|||
|
||||
#include "grib_tools.h"
|
||||
|
||||
void usage(const char*);
|
||||
static void usage_and_exit(const char* progname) {
|
||||
printf("\nUsage: %s [-v] [-d] [-s]\n",progname);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#define INFO_PRINT_ALL 0
|
||||
#define INFO_PRINT_VERSION (1<<0)
|
||||
|
@ -43,12 +46,12 @@ int main( int argc,char* argv[])
|
|||
print_flags|=INFO_PRINT_SAMPLES_PATH;
|
||||
break;
|
||||
default:
|
||||
usage(argv[0]);
|
||||
usage_and_exit(argv[0]);
|
||||
}
|
||||
}
|
||||
|
||||
nfiles=argc-optind;
|
||||
if (nfiles != 0) usage(argv[0]);
|
||||
if (nfiles != 0) usage_and_exit(argv[0]);
|
||||
|
||||
if (print_flags == INFO_PRINT_ALL) {
|
||||
printf("\n");
|
||||
|
@ -114,8 +117,3 @@ int main( int argc,char* argv[])
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void usage(const char* progname) {
|
||||
printf("\nUsage: %s [-v] [-d] [-s]\n",progname);
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ unsigned char unused(char c)
|
|||
}
|
||||
*/
|
||||
|
||||
int next(FILE *f, char *buf)
|
||||
static int next(FILE *f, char *buf)
|
||||
{
|
||||
int c;
|
||||
int i = 0;
|
||||
|
|
|
@ -177,7 +177,7 @@ int grib_tool_new_handle_action(grib_runtime_options* options,grib_handle* h)
|
|||
}
|
||||
|
||||
if (options->latlon) {
|
||||
int err=0;
|
||||
err=0;
|
||||
double min;
|
||||
int i;
|
||||
if (!n) n=grib_nearest_new(h,&err);
|
||||
|
|
|
@ -89,7 +89,7 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
|
|||
size_t bmp_len = 0;
|
||||
double *data_values=0,*lats=0,*lons=0;
|
||||
int n = 0;
|
||||
size_t size=0;
|
||||
size_t size=0, num_bytes=0;
|
||||
long hasMissingValues = 0;
|
||||
|
||||
if (grib_options_on("m:")) {
|
||||
|
@ -125,10 +125,11 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
|
|||
|
||||
iter=grib_iterator_new(h,0,&err);
|
||||
|
||||
num_bytes = (numberOfPoints+1)*sizeof(double);
|
||||
data_values=(double*)calloc(numberOfPoints+1, sizeof(double));
|
||||
if (!data_values) {
|
||||
fprintf(dump_file, "ERROR: failed to allocate %ld bytes for data values (number of points=%ld)\n",
|
||||
(numberOfPoints+1)*sizeof(double), numberOfPoints);
|
||||
(long)num_bytes, numberOfPoints);
|
||||
exit(GRIB_OUT_OF_MEMORY);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ static void usage(const char *prog)
|
|||
exit(1);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int i,j;
|
||||
FILE *in;
|
||||
|
@ -60,7 +60,7 @@ int main(int argc, const char *argv[])
|
|||
values = (double*)malloc(size*sizeof(double));
|
||||
last_size = size;
|
||||
if (!values) {
|
||||
fprintf(stderr, "Failed to allocate memory for values (%ld bytes)\n", size*sizeof(double));
|
||||
fprintf(stderr, "Failed to allocate memory for values (%lu bytes)\n", size*sizeof(double));
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ int grib_tool_new_file_action(grib_runtime_options* options,grib_tools_file* fil
|
|||
return 0;
|
||||
}
|
||||
|
||||
int idx(double lat,double lon,double latFirst,double lonFirst,double latLast,double lonLast,
|
||||
static int idx(double lat,double lon,double latFirst,double lonFirst,double latLast,double lonLast,
|
||||
long Ni,double di,double dj)
|
||||
{
|
||||
long ilon,ilat;
|
||||
|
@ -96,7 +96,7 @@ int idx(double lat,double lon,double latFirst,double lonFirst,double latLast,dou
|
|||
return ilon+ilat*Ni;
|
||||
}
|
||||
|
||||
grib_handle* merge(grib_handle* h1,grib_handle* h2)
|
||||
static grib_handle* merge(grib_handle* h1,grib_handle* h2)
|
||||
{
|
||||
char s1[100]={0,};
|
||||
size_t len1;
|
||||
|
|
|
@ -890,9 +890,9 @@ void grib_print_key_values(grib_runtime_options* options, grib_handle* h)
|
|||
if (options->latlon) {
|
||||
|
||||
if (options->latlon_mode==4){
|
||||
int i=0;
|
||||
for (i=0;i<4;i++) {
|
||||
fprintf(dump_file,options->format,options->values[i]);
|
||||
int ii=0;
|
||||
for (ii=0;ii<4;ii++) {
|
||||
fprintf(dump_file,options->format,options->values[ii]);
|
||||
fprintf(dump_file," ");
|
||||
}
|
||||
written_to_dump=1;
|
||||
|
|
|
@ -262,10 +262,10 @@ static void printInfo(grib_handle* h)
|
|||
lastPrint=count;
|
||||
}
|
||||
|
||||
static void print_index_key_values(grib_index* index,int counter,const char* error_message)
|
||||
static void print_index_key_values(grib_index* index,int cnt,const char* error_message)
|
||||
{
|
||||
grib_index_key* keys=index->keys;
|
||||
printf("== %d == ",counter);
|
||||
printf("== %d == ", cnt);
|
||||
if (error_message) printf("%s == ",error_message);
|
||||
while (keys) {
|
||||
printf("%s=%s ",keys->name,keys->value);
|
||||
|
|
|
@ -36,7 +36,7 @@ char* grib_tool_description="List content of GTS files printing values of "
|
|||
"some keys.\n\tIt does not fail when a key is not found.";
|
||||
char* grib_tool_name="gts_ls";
|
||||
char* grib_tool_usage="[options] file file ...";
|
||||
static char* new_handle="";
|
||||
/*static char* new_handle="";*/
|
||||
|
||||
int grib_options_count=sizeof(grib_options)/sizeof(grib_option);
|
||||
int mode=0;
|
||||
|
@ -95,7 +95,7 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
|
|||
if( err != GRIB_SUCCESS && options->fail) exit(err);
|
||||
}
|
||||
|
||||
new_handle="\n,";
|
||||
/*new_handle="\n,";*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue