|
37 | 37 | #include <math.h> |
38 | 38 |
|
39 | 39 | #include "../omc_inline.h" |
| 40 | +#include "../util/ModelicaUtilities.h" |
40 | 41 | #ifdef _MSC_VER |
41 | 42 | #include "../util/omc_msvc.h" |
42 | 43 | #endif |
@@ -432,7 +433,6 @@ static char parseHead(TEXT_FILE *f, const char* hdr, size_t hdrLen, const char * |
432 | 433 |
|
433 | 434 | static size_t Text_readLine(TEXT_FILE *f, char **data, size_t *size) |
434 | 435 | { |
435 | | - char *tmp = NULL; |
436 | 436 | size_t col = 0; |
437 | 437 | size_t i = 0; |
438 | 438 | int ch = 0; |
@@ -475,11 +475,9 @@ static char Text_findTable(TEXT_FILE *f, const char* tableName, size_t *cols, si |
475 | 475 | { |
476 | 476 | char *strLn=0; |
477 | 477 | const char *tblName=0; |
478 | | - int ch=0; |
479 | 478 | size_t buflen=0; |
480 | 479 | size_t _cols = 0; |
481 | 480 | size_t _rows = 0; |
482 | | - size_t i=0; |
483 | 481 | size_t col = 0; |
484 | 482 |
|
485 | 483 | while(!feof(f->fp)) |
@@ -515,7 +513,6 @@ static void Text_readTable(TEXT_FILE *f, double *buf, size_t rows, size_t cols) |
515 | 513 | char *strLn=0; |
516 | 514 | size_t buflen=0; |
517 | 515 | size_t sl=0; |
518 | | - size_t nlen=0; |
519 | 516 | char *number=0; |
520 | 517 | char *entp = 0; |
521 | 518 | for(i = 0; i < rows; ++i) |
@@ -606,6 +603,7 @@ static size_t Mat_getTypeSize(MAT_FILE *f, long type) |
606 | 603 | default: |
607 | 604 | fclose(f->fp); |
608 | 605 | ModelicaFormatError("Corrupted MAT-file: `%s'",f->filename); |
| 606 | + return 0; /* Cannot reach this */ |
609 | 607 | } |
610 | 608 | } |
611 | 609 |
|
@@ -783,7 +781,6 @@ static void csv_close(CSV_FILE *f) |
783 | 781 |
|
784 | 782 | static size_t csv_readLine(CSV_FILE *f, char **data, size_t *size) |
785 | 783 | { |
786 | | - char *tmp = NULL; |
787 | 784 | size_t col = 0; |
788 | 785 | size_t i = 0; |
789 | 786 | int ch = 0; |
@@ -884,7 +881,6 @@ static char csv_findTable(CSV_FILE *f, const char *tableName, size_t *cols, size |
884 | 881 |
|
885 | 882 | static void csv_readTable(CSV_FILE *f, const char *tableName, double *data, size_t rows, size_t cols) |
886 | 883 | { |
887 | | - char stop=0; |
888 | 884 | char *strLn=NULL; |
889 | 885 | size_t buflen=0; |
890 | 886 | size_t c=0; |
@@ -929,7 +925,6 @@ static void csv_readTable(CSV_FILE *f, const char *tableName, double *data, size |
929 | 925 | */ |
930 | 926 | static void openFile(const char *filename, const char* tableName, size_t *rows, size_t *cols, double **data) |
931 | 927 | { |
932 | | - size_t i = 0; |
933 | 928 | size_t sl = 0; |
934 | 929 | char filetype[5] = {0}; |
935 | 930 | /* get File Type */ |
@@ -1029,7 +1024,6 @@ static InterpolationTable* InterpolationTable_init(double time, double startTime |
1029 | 1024 | int tableDim2, int colWise) |
1030 | 1025 | { |
1031 | 1026 | size_t i=0; |
1032 | | - size_t l=0; |
1033 | 1027 | size_t size = tableDim1*tableDim2; |
1034 | 1028 | InterpolationTable *tpl = 0; |
1035 | 1029 | tpl = (InterpolationTable*)calloc(1,sizeof(InterpolationTable)); |
@@ -1206,7 +1200,6 @@ static InterpolationTable2D* InterpolationTable2D_init(int ipoType, const char* |
1206 | 1200 | int tableDim1, int tableDim2, int colWise) |
1207 | 1201 | { |
1208 | 1202 | size_t i=0; |
1209 | | - size_t l=0; |
1210 | 1203 | size_t size = tableDim1*tableDim2; |
1211 | 1204 | InterpolationTable2D *tpl = 0; |
1212 | 1205 | tpl = (InterpolationTable2D*)calloc(1,sizeof(InterpolationTable2D)); |
|
0 commit comments