Skip to content

Commit 6f51bb7

Browse files
author
Christian SChubert
committed
remove warnings in read_matlab4.c
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13649 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent abe7b96 commit 6f51bb7

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

SimulationRuntime/c/util/read_matlab4.c

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
#include <assert.h>
66
#include "read_matlab4.h"
77

8+
// Make Visual Studio not complain about deprecated items
9+
#ifdef _MSC_VER
10+
#define strdup _strdup
11+
#endif
12+
813
const char *binTrans_char = "binTrans";
914
const char *binNormal_char = "binNormal";
1015

@@ -55,12 +60,13 @@ void omc_free_matlab4_reader(ModelicaMatReader *reader)
5560

5661
void remSpaces(char *ch){
5762
char *ch2 = ch;
58-
int i,j=0;
63+
unsigned int ui = 0;
64+
unsigned int uj = 0;
5965

60-
for(i=0;i<=strlen(ch);i++){
61-
if(ch[i]!=' '){
62-
ch2[j] = ch[i];
63-
j++;
66+
for(ui=0;ui<=strlen(ch);ui++){
67+
if(ch[ui]!=' '){
68+
ch2[uj] = ch[ui];
69+
uj++;
6470
}
6571
}
6672
}

0 commit comments

Comments
 (0)