Fixing compiler warnings

This commit is contained in:
Michael Tryby
2018-09-13 10:48:55 -04:00
parent 735811dd60
commit bec729a669
5 changed files with 35 additions and 34 deletions

View File

@@ -185,7 +185,7 @@ int DLLEXPORT ENepanet(const char *f1, const char *f2, const char *f3, void (*pv
return (errcode);
}
int DLLEXPORT ENinit(char *f2, char *f3, int UnitsType,
int DLLEXPORT ENinit(const char *f2, const char *f3, int UnitsType,
int HeadlossFormula) {
int errcode = 0;
ERRCODE(EN_createproject(&_defaultModel));
@@ -193,14 +193,14 @@ int DLLEXPORT ENinit(char *f2, char *f3, int UnitsType,
return (errcode);
}
int DLLEXPORT ENopen(char *f1, char *f2, char *f3) {
int DLLEXPORT ENopen(const char *f1, const char *f2, const char *f3) {
int errcode = 0;
ERRCODE(EN_createproject(&_defaultModel));
EN_open(_defaultModel, f1, f2, f3);
return (errcode);
}
int DLLEXPORT ENsaveinpfile(char *filename) {
int DLLEXPORT ENsaveinpfile(const char *filename) {
return EN_saveinpfile(_defaultModel, filename);
}
@@ -642,7 +642,7 @@ int DLLEXPORT EN_runproject(EN_ProjectHandle ph, const char *f1, const char *f2,
return errcode;
}
int DLLEXPORT EN_init(EN_ProjectHandle ph, char *f2, char *f3,
int DLLEXPORT EN_init(EN_ProjectHandle ph, const char *f2, const char *f3,
EN_FlowUnits UnitsType, EN_FormType HeadlossFormula)
/*----------------------------------------------------------------
** Input:
@@ -777,7 +777,7 @@ int DLLEXPORT EN_open(EN_ProjectHandle ph, const char *f1, const char *f2, const
return set_error(p->error_handle, errcode);
}
int DLLEXPORT EN_saveinpfile(EN_ProjectHandle ph, char *filename)
int DLLEXPORT EN_saveinpfile(EN_ProjectHandle ph, const char *filename)
/*----------------------------------------------------------------
** Input: filename = name of INP file
** Output: none

View File

@@ -248,6 +248,6 @@ int saveepilog(EN_Project *pr); /* Saves output file epilog
/* ------------ INPFILE.C --------------*/
int saveinpfile(EN_Project *pr, char *); /* Saves network to text file */
int saveinpfile(EN_Project *pr, const char *); /* Saves network to text file */
#endif

View File

@@ -114,7 +114,7 @@ void saveauxdata(parser_data_t *parser, FILE *f)
//// This function was heavily modified. ////
int saveinpfile(EN_Project *pr, char *fname)
int saveinpfile(EN_Project *pr, const char *fname)
/*
-------------------------------------------------
Writes network data to text file.