mirror of https://github.com/ecmwf/eccodes.git
Run C examples thru cppcheck and clean up
This commit is contained in:
parent
8cca8d1102
commit
358f1da3b7
|
@ -31,8 +31,6 @@ int main(int argc,char* argv[])
|
|||
codes_handle* h=NULL;
|
||||
|
||||
double *values = NULL;
|
||||
long longVal;
|
||||
double doubleVal;
|
||||
size_t values_len=0;
|
||||
int i, err=0;
|
||||
int cnt=0;
|
||||
|
|
|
@ -24,7 +24,6 @@ void usage(char* prog) {
|
|||
|
||||
int main(int argc,char* argv[])
|
||||
{
|
||||
char* filename = NULL;
|
||||
FILE* in = NULL;
|
||||
|
||||
/* message handle. Required in all the eccodes calls acting on a message.*/
|
||||
|
|
|
@ -24,16 +24,13 @@ void usage(char* prog) {
|
|||
|
||||
int main(int argc,char* argv[])
|
||||
{
|
||||
char* filename = NULL;
|
||||
FILE* in = NULL;
|
||||
|
||||
/* message handle. Required in all the eccodes calls acting on a message.*/
|
||||
codes_handle* h=NULL;
|
||||
|
||||
double *values = NULL;
|
||||
|
||||
long longVal;
|
||||
double doubleVal;
|
||||
size_t values_len=0;
|
||||
int err=0;
|
||||
int cnt=0;
|
||||
char* infile = "../../data/bufr/syno_multi.bufr";
|
||||
|
|
|
@ -29,11 +29,8 @@ int main(int argc,char* argv[])
|
|||
|
||||
/* message handle. Required in all the eccodes calls acting on a message.*/
|
||||
codes_handle* h=NULL;
|
||||
|
||||
long *desc = NULL;
|
||||
long longVal;
|
||||
size_t len=0;
|
||||
int err=0, i, cnt=0;
|
||||
int err=0, cnt=0;
|
||||
|
||||
if (argc!=2) usage(argv[0]);
|
||||
|
||||
|
|
|
@ -24,22 +24,17 @@ void usage(char* prog) {
|
|||
|
||||
int main(int argc,char* argv[])
|
||||
{
|
||||
char* filename = NULL;
|
||||
FILE* in = NULL;
|
||||
|
||||
/* message handle. Required in all the eccodes calls acting on a message.*/
|
||||
codes_handle* h=NULL;
|
||||
|
||||
double *values = NULL;
|
||||
long numberOfSubsets=0;
|
||||
long longVal;
|
||||
double doubleVal;
|
||||
size_t values_len=0;
|
||||
int i,err=0;
|
||||
int cnt=0;
|
||||
char* infile = "../../data/bufr/synop_multi_subset.bufr";
|
||||
|
||||
|
||||
in=fopen(infile,"r");
|
||||
if (!in) {
|
||||
printf("ERROR: unable to open file %s\n", infile);
|
||||
|
|
Loading…
Reference in New Issue