Skip to content

Commit

Permalink
- Fixed some clang warnings.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@18091 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed Nov 11, 2013
1 parent dbbc4ec commit f24069a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SimulationRuntime/c/meta/meta_modelica.c
Expand Up @@ -810,15 +810,15 @@ unsigned long mmc_prim_hash(void *p,unsigned long hash /* start at 5381 */)
if (MMC_IS_INTEGER(p))
{
unsigned long l = (unsigned long)MMC_UNTAGFIXNUM(p);
return djb2_hash_iter((char*)&l, sizeof(unsigned long), hash);
return djb2_hash_iter((unsigned char*)&l, sizeof(unsigned long), hash);
}

phdr = MMC_GETHDR(p);

if( phdr == MMC_REALHDR )
{
double d = mmc_unbox_real(p);
return djb2_hash_iter((char*)&d, sizeof(double), hash);
return djb2_hash_iter((unsigned char*)&d, sizeof(double), hash);
}

if( MMC_HDRISSTRING(phdr) )
Expand All @@ -833,7 +833,7 @@ unsigned long mmc_prim_hash(void *p,unsigned long hash /* start at 5381 */)
int ctor = MMC_HDRCTOR(phdr);
int is_record = slots>0 && ctor > 1 ? 1 : 0;
pp = MMC_STRUCTDATA(p);
hash = djb2_hash_iter((char*)&ctor, sizeof(int), hash);
hash = djb2_hash_iter((unsigned char*)&ctor, sizeof(int), hash);
if (slots == 0)
return hash;

Expand Down

0 comments on commit f24069a

Please sign in to comment.