Skip to content

Commit

Permalink
Fix warnings in unit_test
Browse files Browse the repository at this point in the history
  • Loading branch information
ZedThree committed Mar 11, 2024
1 parent d748381 commit 7218971
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion unit_test/tst_exhash.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ main(int argc, char** argv)
ncexhashkey_t rehash;
if((stat = ncexhashiterate(map, &hashkey, &data)) == NC_EINVAL) CHECK(stat);
if(stat == NC_ERANGE) break;
rehash = hkeyfor(data - (*np));
rehash = hkeyfor((unsigned int)data - (*np));
assert(hashkey == rehash);
}
}
Expand Down
6 changes: 3 additions & 3 deletions unit_test/tst_xcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ generatestrings(int n, unsigned seed)
/* Generate one random string */
if((s = (char*)malloc(1+MAXSTRLEN))==NULL) abort();
rnd = random();
len = rnd % MAXSTRLEN;
len = (int)rnd % MAXSTRLEN;
/* generate the characters */
for(k=0;k<len;k++) {
do {rnd = random() % 127;} while(rnd <= ' ');
Expand Down Expand Up @@ -151,7 +151,7 @@ main(int argc, char** argv)
ncxcacheprint(cache);
#endif

NCT_reporttime(ns, inserttime, insertrange, "insert");
NCT_reporttime((unsigned int)ns, inserttime, insertrange, "insert");

/* Try to touch and extract all the entries */

Expand All @@ -174,7 +174,7 @@ main(int argc, char** argv)
ncxcacheprint(cache);
#endif

NCT_reporttime(ns, readtime, readrange, "read");
NCT_reporttime((unsigned int)ns, readtime, readrange, "read");

for(i=0;i<ns;i++) {
void* top = NULL;
Expand Down

0 comments on commit 7218971

Please sign in to comment.