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

Commit

Permalink
fix some c-compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
hkiel authored and OpenModelica-Hudson committed Oct 9, 2017
1 parent 341fd25 commit abd28f2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions Compiler/SimCode/SimCodeUtil.mo
Expand Up @@ -3248,8 +3248,6 @@ algorithm
end match;
end createTempVars;

// no matchcontinue needed -> try/catch around whole
// loops the eqs list -> no recursion needed
protected function createNonlinearResidualEquations
input list<BackendDAE.Equation> eqs;
input Integer iuniqueEqIndex;
Expand Down
10 changes: 5 additions & 5 deletions Compiler/runtime/serializer.cpp
Expand Up @@ -619,13 +619,13 @@ void indent(){
void Serializer_showBlocks(modelica_metatype object){
if(MMC_IS_IMMEDIATE(object)){
indent();
printf("%i\n",MMC_UNTAGFIXNUM(object));
printf("%li\n",MMC_UNTAGFIXNUM(object));
return;
}
mmc_uint_t hdr = MMC_GETHDR(object);
if(MMC_HDRISSTRING(hdr)){
indent();
printf("str(%i)=\"%s\"\n",MMC_HDRSTRLEN(hdr),MMC_STRINGDATA(object));
printf("str(%lu)=\"%s\"\n",MMC_HDRSTRLEN(hdr),MMC_STRINGDATA(object));
return;
}
if(hdr==MMC_REALHDR){
Expand All @@ -639,11 +639,11 @@ void Serializer_showBlocks(modelica_metatype object){
int count = slots-1;
if(ctor==255){// it's an array
indent();
printf("array(%i)\n",slots);
printf("array(%lu)\n",slots);
}
else {
indent();
printf("ctr(%i,%i)\n",ctor,slots);
printf("ctr(%lu,%lu)\n",ctor,slots);
if(ctor>=3 && ctor!=255){ // It's a meta record
struct record_description* desc = (struct record_description*) MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(object),1));
indent();printf(" - %s\n",desc->path);
Expand All @@ -659,7 +659,7 @@ void Serializer_showBlocks(modelica_metatype object){
return;
}

printf("Unknown object %i\n",hdr);
printf("Unknown object %lu\n",hdr);
}


Expand Down
2 changes: 1 addition & 1 deletion Compiler/runtime/systemimpl.c
Expand Up @@ -2793,7 +2793,7 @@ int SystemImpl__fileIsNewerThan(const char *file1, const char *file2)

void SystemImpl__initGarbageCollector(void)
{
static init=0;
static int init=0;
if (!init) {
GC_init();
GC_register_displacement(0);
Expand Down

0 comments on commit abd28f2

Please sign in to comment.