Skip to content

Commit

Permalink
Comment out complex types that trigger warnings on CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
hpwxf committed Nov 13, 2023
1 parent 6f83798 commit 5df5c3d
Showing 1 changed file with 29 additions and 26 deletions.
55 changes: 29 additions & 26 deletions Lbfgsb.3.0/local_f2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,32 +167,35 @@ typedef struct Namelist Namelist;

/* procedure parameter types for -A and -C++ */

#define F2C_proc_par_types 1
#ifdef __cplusplus
typedef int /* Unknown procedure type */ (*U_fp)(...);
typedef shortint (*J_fp)(...);
typedef integer (*I_fp)(...);
typedef real (*R_fp)(...);
typedef doublereal (*D_fp)(...), (*E_fp)(...);
typedef /* Complex */ VOID (*C_fp)(...);
typedef /* Double Complex */ VOID (*Z_fp)(...);
typedef logical (*L_fp)(...);
typedef shortlogical (*K_fp)(...);
typedef /* Character */ VOID (*H_fp)(...);
typedef /* Subroutine */ int (*S_fp)(...);
#else
typedef int /* Unknown procedure type */ (*U_fp)();
typedef shortint (*J_fp)();
typedef integer (*I_fp)();
typedef real (*R_fp)();
typedef doublereal (*D_fp)(), (*E_fp)();
typedef /* Complex */ VOID (*C_fp)();
typedef /* Double Complex */ VOID (*Z_fp)();
typedef logical (*L_fp)();
typedef shortlogical (*K_fp)();
typedef /* Character */ VOID (*H_fp)();
typedef /* Subroutine */ int (*S_fp)();
#endif
// Disabled to fix the follow compiler warning (required to submit to CRAN)
// warning: function declaration isn't a prototype [-Wstrict-prototypes]

//#define F2C_proc_par_types 1
//#ifdef __cplusplus
//typedef int /* Unknown procedure type */ (*U_fp)(...);
//typedef shortint (*J_fp)(...);
//typedef integer (*I_fp)(...);
//typedef real (*R_fp)(...);
//typedef doublereal (*D_fp)(...), (*E_fp)(...);
//typedef /* Complex */ VOID (*C_fp)(...);
//typedef /* Double Complex */ VOID (*Z_fp)(...);
//typedef logical (*L_fp)(...);
//typedef shortlogical (*K_fp)(...);
//typedef /* Character */ VOID (*H_fp)(...);
//typedef /* Subroutine */ int (*S_fp)(...);
//#else
//typedef int /* Unknown procedure type */ (*U_fp)();
//typedef shortint (*J_fp)();
//typedef integer (*I_fp)();
//typedef real (*R_fp)();
//typedef doublereal (*D_fp)(), (*E_fp)();
//typedef /* Complex */ VOID (*C_fp)();
//typedef /* Double Complex */ VOID (*Z_fp)();
//typedef logical (*L_fp)();
//typedef shortlogical (*K_fp)();
//typedef /* Character */ VOID (*H_fp)();
//typedef /* Subroutine */ int (*S_fp)();
//#endif
/* E_fp is for real functions when -R is not specified */
typedef VOID C_f; /* complex function */
typedef VOID H_f; /* character function */
Expand Down

0 comments on commit 5df5c3d

Please sign in to comment.