mirror of https://github.com/ecmwf/eccodes.git
Fortran: Compiler warnings (SUP-3893)
This commit is contained in:
parent
9ba56e862d
commit
64dfdd9f04
|
@ -1513,14 +1513,8 @@ int grib_f_new_from_message(int* gid, void* buffer , size_t* bufsize){
|
|||
|
||||
/* See SUP-3893: Need to provide an 'int' version */
|
||||
int grib_f_new_from_message_int_(int* gid, int* buffer , size_t* bufsize) {
|
||||
grib_handle *h = NULL;
|
||||
h = grib_handle_new_from_message_copy(0, (void*)buffer, *bufsize);
|
||||
if (h){
|
||||
push_handle(h,gid);
|
||||
return GRIB_SUCCESS;
|
||||
}
|
||||
*gid = -1;
|
||||
return GRIB_INTERNAL_ERROR;
|
||||
/* Call the version with void pointer */
|
||||
return grib_f_new_from_message_(gid, (void*)buffer, bufsize);
|
||||
}
|
||||
int grib_f_new_from_message_int__(int* gid, int* buffer , size_t* bufsize){
|
||||
return grib_f_new_from_message_int_(gid, buffer, bufsize);
|
||||
|
@ -1536,7 +1530,6 @@ int grib_f_new_from_message_copy_(int* gid, void* buffer , size_t* bufsize){
|
|||
push_handle(h,gid);
|
||||
return GRIB_SUCCESS;
|
||||
}
|
||||
|
||||
*gid = -1;
|
||||
return GRIB_INTERNAL_ERROR;
|
||||
}
|
||||
|
@ -1550,16 +1543,13 @@ int grib_f_new_from_message_copy(int* gid, void* buffer , size_t* bufsize){
|
|||
/*****************************************************************************/
|
||||
int grib_f_new_from_samples_(int* gid, char* name, int lname){
|
||||
char fname[1024];
|
||||
grib_handle *h = NULL;
|
||||
|
||||
h = grib_handle_new_from_samples(NULL,cast_char(fname,name,lname));
|
||||
grib_handle *h = grib_handle_new_from_samples(NULL,cast_char(fname,name,lname));
|
||||
/* grib_context_set_debug(h->context,1);*/
|
||||
|
||||
if(h){
|
||||
push_handle(h,gid);
|
||||
return GRIB_SUCCESS;
|
||||
}
|
||||
|
||||
*gid = -1;
|
||||
return GRIB_FILE_NOT_FOUND;
|
||||
}
|
||||
|
@ -1573,16 +1563,13 @@ int grib_f_new_from_samples(int* gid, char* name , int lname){
|
|||
/*****************************************************************************/
|
||||
int codes_bufr_f_new_from_samples_(int* gid, char* name, int lname){
|
||||
char fname[1024];
|
||||
grib_handle *h = NULL;
|
||||
|
||||
h = codes_bufr_handle_new_from_samples(NULL,cast_char(fname,name,lname));
|
||||
grib_handle* h = codes_bufr_handle_new_from_samples(NULL,cast_char(fname,name,lname));
|
||||
/* grib_context_set_debug(h->context,1);*/
|
||||
|
||||
if(h){
|
||||
push_handle(h,gid);
|
||||
return GRIB_SUCCESS;
|
||||
}
|
||||
|
||||
*gid = -1;
|
||||
return GRIB_FILE_NOT_FOUND;
|
||||
}
|
||||
|
@ -1715,6 +1702,7 @@ int any_f_scan_file__(int* fid,int* n) {
|
|||
return any_f_scan_file(fid,n);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
int any_f_new_from_scanned_file(int* fid,int* msgid,int* gid)
|
||||
{
|
||||
grib_handle *h = NULL;
|
||||
|
@ -1744,7 +1732,6 @@ int any_f_new_from_scanned_file(int* fid,int* msgid,int* gid)
|
|||
return GRIB_END_OF_FILE;
|
||||
}
|
||||
}
|
||||
|
||||
int any_f_new_from_scanned_file_(int* fid,int* msgid,int* gid){
|
||||
return any_f_new_from_scanned_file(fid,msgid,gid);
|
||||
}
|
||||
|
@ -1789,6 +1776,7 @@ int any_f_load_all_from_file__(int* fid,int* n) {
|
|||
return any_f_load_all_from_file(fid,n);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
int any_f_new_from_loaded(int* msgid,int* gid)
|
||||
{
|
||||
grib_handle *h = NULL;
|
||||
|
@ -1818,6 +1806,7 @@ int any_f_new_from_loaded__(int* msgid,int* gid){
|
|||
return any_f_new_from_loaded(msgid,gid);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
int codes_f_clear_loaded_from_file(void) {
|
||||
grib_context* c=grib_context_get_default();
|
||||
/* grib_oarray_delete_content(c,binary_messages); */
|
||||
|
@ -2031,7 +2020,6 @@ int grib_f_index_add_file_(int* iid, char* file, int lfile) {
|
|||
int grib_f_index_add_file__(int* iid, char* file, int lfile) {
|
||||
return grib_f_index_add_file_(iid,file,lfile);
|
||||
}
|
||||
|
||||
int grib_f_index_add_file(int* iid, char* file, int lfile) {
|
||||
return grib_f_index_add_file_(iid,file,lfile);
|
||||
}
|
||||
|
@ -2109,7 +2097,6 @@ int grib_f_multi_handle_release(int* hid){
|
|||
return grib_f_multi_handle_release_(hid);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
int grib_f_release_(int* hid){
|
||||
return clear_handle(*hid);
|
||||
}
|
||||
|
@ -3205,7 +3192,6 @@ int grib_f_set_force_real8_array_(int* gid, char* key, double*val, int* size, in
|
|||
if(!h) return GRIB_INVALID_GRIB;
|
||||
|
||||
return grib_set_force_double_array(h, cast_char(buf,key,len), val, lsize);
|
||||
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -3255,7 +3241,6 @@ int grib_f_get_string_array_(int* gid, char* key, char* val,int* nvals,int* slen
|
|||
|
||||
return err;
|
||||
}
|
||||
|
||||
int grib_f_get_string_array__(int* gid, char* key, char* val,int* nvals,int* slen, int len){
|
||||
return grib_f_get_string_array_( gid, key, val,nvals,slen,len);
|
||||
}
|
||||
|
@ -3284,7 +3269,6 @@ int codes_f_bufr_copy_data(int* gid1,int* gid2){
|
|||
return codes_f_bufr_copy_data_(gid1, gid2);
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
int grib_f_set_string_array_(int* gid, char* key, char* val,int* nvals,int* slen, int len)
|
||||
{
|
||||
|
@ -3317,7 +3301,6 @@ int grib_f_set_string_array_(int* gid, char* key, char* val,int* nvals,int* slen
|
|||
|
||||
return err;
|
||||
}
|
||||
|
||||
int grib_f_set_string_array__(int* gid, char* key, char* val,int* nvals,int* slen, int len){
|
||||
return grib_f_set_string_array_( gid, key, val,nvals,slen,len);
|
||||
}
|
||||
|
@ -3343,7 +3326,6 @@ int grib_f_get_string_(int* gid, char* key, char* val,int len, int len2){
|
|||
|
||||
return err;
|
||||
}
|
||||
|
||||
int grib_f_get_string__(int* gid, char* key, char* val, int len, int len2){
|
||||
return grib_f_get_string_( gid, key, val, len, len2);
|
||||
}
|
||||
|
@ -3359,6 +3341,8 @@ static int is_all_spaces(const char *s)
|
|||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
int grib_f_set_string_(int* gid, char* key, char* val, int len, int len2){
|
||||
|
||||
grib_handle *h = get_handle(*gid);
|
||||
|
@ -3379,7 +3363,6 @@ int grib_f_set_string_(int* gid, char* key, char* val, int len, int len2){
|
|||
|
||||
return grib_set_string(h, cast_char(buf,key,len), val_str, &lsize);
|
||||
}
|
||||
|
||||
int grib_f_set_string__(int* gid, char* key, char* val, int len, int len2){
|
||||
return grib_f_set_string_( gid, key, val, len, len2);
|
||||
}
|
||||
|
@ -3417,7 +3400,6 @@ int grib_f_get_data_real4_(int* gid,float* lats, float* lons,float* values,size_
|
|||
grib_context_free(h->context,lon8);
|
||||
|
||||
return err;
|
||||
|
||||
}
|
||||
int grib_f_get_data_real4__(int* gid,float* lats, float* lons,float* values,size_t* size) {
|
||||
return grib_f_get_data_real4_(gid,lats,lons,values,size);
|
||||
|
@ -3426,8 +3408,8 @@ int grib_f_get_data_real4(int* gid,float* lats, float* lons,float* values,size_t
|
|||
return grib_f_get_data_real4_(gid,lats,lons,values,size);
|
||||
}
|
||||
|
||||
int grib_f_get_data_real8_(int* gid,double* lats, double* lons,double* values,size_t* size) {
|
||||
|
||||
int grib_f_get_data_real8_(int* gid,double* lats, double* lons,double* values,size_t* size) {
|
||||
grib_handle *h = get_handle(*gid);
|
||||
return grib_get_data(h,lats,lons,values);
|
||||
|
||||
|
@ -3443,10 +3425,8 @@ int grib_f_get_data_real8(int* gid,double* lats, double* lons,double* values,siz
|
|||
int grib_f_get_message_size_(int* gid, size_t *len){
|
||||
grib_handle *h = get_handle(*gid);
|
||||
if(!h) return GRIB_INVALID_GRIB;
|
||||
|
||||
*len = h->buffer->ulength;
|
||||
return GRIB_SUCCESS;
|
||||
|
||||
}
|
||||
int grib_f_get_message_size__(int* gid, size_t *len){
|
||||
return grib_f_get_message_size_( gid, len);
|
||||
|
@ -3467,13 +3447,10 @@ int grib_f_copy_message_(int* gid, void* mess,size_t* len){
|
|||
return GRIB_BUFFER_TOO_SMALL;
|
||||
}
|
||||
|
||||
|
||||
memcpy(mess,h->buffer->data,h->buffer->ulength);
|
||||
*len=h->buffer->ulength;
|
||||
return GRIB_SUCCESS;
|
||||
|
||||
}
|
||||
|
||||
int grib_f_copy_message__(int* gid, void* mess,size_t* len){
|
||||
return grib_f_copy_message_( gid, mess, len);
|
||||
}
|
||||
|
@ -3495,7 +3472,6 @@ void grib_f_check_(int* err,char* call,char* str,int lencall,int lenstr){
|
|||
bufcall,bufstr,grib_get_error_message(*err));
|
||||
exit(*err);
|
||||
}
|
||||
|
||||
void grib_f_check__(int* err,char* call, char* key, int lencall, int lenkey){
|
||||
grib_f_check_(err,call,key,lencall,lenkey);
|
||||
}
|
||||
|
@ -3524,7 +3500,6 @@ int grib_f_write_(int* gid, int* fid) {
|
|||
int grib_f_write__(int* gid, int* fid) {
|
||||
return grib_f_write_(gid,fid);
|
||||
}
|
||||
|
||||
int grib_f_write(int* gid, int* fid) {
|
||||
return grib_f_write_(gid,fid);
|
||||
}
|
||||
|
@ -3539,16 +3514,14 @@ int grib_f_multi_write_(int* gid, int* fid) {
|
|||
|
||||
return grib_multi_handle_write(h,f);
|
||||
}
|
||||
|
||||
|
||||
int grib_f_multi_write__(int* gid, int* fid) {
|
||||
return grib_f_multi_write_(gid,fid);
|
||||
}
|
||||
|
||||
int grib_f_multi_write(int* gid, int* fid) {
|
||||
return grib_f_multi_write_(gid,fid);
|
||||
}
|
||||
|
||||
|
||||
int grib_f_multi_append_(int* ingid, int* sec,int* mgid) {
|
||||
grib_handle *h = get_handle(*ingid);
|
||||
grib_multi_handle *mh = get_multi_handle(*mgid);
|
||||
|
@ -3562,16 +3535,13 @@ int grib_f_multi_append_(int* ingid, int* sec,int* mgid) {
|
|||
|
||||
return grib_multi_handle_append(h,*sec,mh);
|
||||
}
|
||||
|
||||
int grib_f_multi_append(int* ingid, int* sec,int* mgid) {
|
||||
return grib_f_multi_append_(ingid, sec, mgid);
|
||||
}
|
||||
|
||||
int grib_f_multi_append__(int* ingid, int* sec,int* mgid) {
|
||||
return grib_f_multi_append_(ingid, sec, mgid);
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
int codes_f_bufr_multi_element_constant_arrays_on_() {
|
||||
codes_bufr_multi_element_constant_arrays_on(NULL);
|
||||
|
@ -3611,6 +3581,7 @@ int grib_f_set_definitions_path(char* path, int len){
|
|||
}
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
int grib_f_set_samples_path_(char* path, int len){
|
||||
grib_context* c = grib_context_get_default();
|
||||
char buf[1024];
|
||||
|
@ -3624,6 +3595,8 @@ int grib_f_set_samples_path(char* path, int len){
|
|||
return grib_f_set_samples_path_(path, len);
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
int grib_f_julian_to_datetime(double* jd,long* year,long* month,long* day,long *hour,long *minute,long *second) {
|
||||
return grib_julian_to_datetime(*jd,year,month,day,hour,minute,second);
|
||||
}
|
||||
|
@ -3634,6 +3607,8 @@ int grib_f_julian_to_datetime__(double* jd,long* year,long* month,long* day,long
|
|||
return grib_julian_to_datetime(*jd,year,month,day,hour,minute,second);
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
int grib_f_datetime_to_julian(long* year,long* month,long* day, long* hour,long* minute,long* second,double* jd) {
|
||||
return grib_datetime_to_julian(*year,*month,*day,*hour,*minute,*second,jd);
|
||||
}
|
||||
|
@ -3643,4 +3618,3 @@ int grib_f_datetime_to_julian_(long* year,long* month,long* day, long* hour,long
|
|||
int grib_f_datetime_to_julian__(long* year,long* month,long* day, long* hour,long* minute,long* second,double* jd) {
|
||||
return grib_datetime_to_julian(*year,*month,*day,*hour,*minute,*second,jd);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue