Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 351c73d

Browse files
hkielOpenModelica-Hudson
authored andcommitted
fix some c-compiler warnings
1 parent 15276ce commit 351c73d

3 files changed

Lines changed: 6 additions & 8 deletions

File tree

Compiler/SimCode/SimCodeUtil.mo

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3248,8 +3248,6 @@ algorithm
32483248
end match;
32493249
end createTempVars;
32503250

3251-
// no matchcontinue needed -> try/catch around whole
3252-
// loops the eqs list -> no recursion needed
32533251
protected function createNonlinearResidualEquations
32543252
input list<BackendDAE.Equation> eqs;
32553253
input Integer iuniqueEqIndex;

Compiler/runtime/serializer.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -619,13 +619,13 @@ void indent(){
619619
void Serializer_showBlocks(modelica_metatype object){
620620
if(MMC_IS_IMMEDIATE(object)){
621621
indent();
622-
printf("%i\n",MMC_UNTAGFIXNUM(object));
622+
printf("%li\n",MMC_UNTAGFIXNUM(object));
623623
return;
624624
}
625625
mmc_uint_t hdr = MMC_GETHDR(object);
626626
if(MMC_HDRISSTRING(hdr)){
627627
indent();
628-
printf("str(%i)=\"%s\"\n",MMC_HDRSTRLEN(hdr),MMC_STRINGDATA(object));
628+
printf("str(%lu)=\"%s\"\n",MMC_HDRSTRLEN(hdr),MMC_STRINGDATA(object));
629629
return;
630630
}
631631
if(hdr==MMC_REALHDR){
@@ -639,11 +639,11 @@ void Serializer_showBlocks(modelica_metatype object){
639639
int count = slots-1;
640640
if(ctor==255){// it's an array
641641
indent();
642-
printf("array(%i)\n",slots);
642+
printf("array(%lu)\n",slots);
643643
}
644644
else {
645645
indent();
646-
printf("ctr(%i,%i)\n",ctor,slots);
646+
printf("ctr(%lu,%lu)\n",ctor,slots);
647647
if(ctor>=3 && ctor!=255){ // It's a meta record
648648
struct record_description* desc = (struct record_description*) MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(object),1));
649649
indent();printf(" - %s\n",desc->path);
@@ -659,7 +659,7 @@ void Serializer_showBlocks(modelica_metatype object){
659659
return;
660660
}
661661

662-
printf("Unknown object %i\n",hdr);
662+
printf("Unknown object %lu\n",hdr);
663663
}
664664

665665

Compiler/runtime/systemimpl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2793,7 +2793,7 @@ int SystemImpl__fileIsNewerThan(const char *file1, const char *file2)
27932793

27942794
void SystemImpl__initGarbageCollector(void)
27952795
{
2796-
static init=0;
2796+
static int init=0;
27972797
if (!init) {
27982798
GC_init();
27992799
GC_register_displacement(0);

0 commit comments

Comments
 (0)