Skip to content

Commit

Permalink
fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ziyht committed May 5, 2019
1 parent 2cfe984 commit 03b0e54
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/libs/etools/testing/edict/test_performance.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ static void performance_keyI_test(uint scale)
t = eutils_nowms();
j = 0; scale ++;
tn = eutils_nowns(); i = 0;
if(edict_find(h, (ekey){i})) j++;
if(edict_val(h, (ekey){i})) j++;
printf("find 1 \telem: %6"PRIu64"ns\n", eutils_nowns() - tn); fflush(stdout);
for(i = 1; i < scale; i++)
{
if(edict_find(h, (ekey){i})) j++;
if(edict_val(h, (ekey){i})) j++;
}

if(edict_len(h) != j)
Expand Down Expand Up @@ -92,7 +92,7 @@ static void performance_keyS_test(uint scale)
for(i64 i = 0; i < scale; i++)
{
sprintf(keyS, "%"PRIi64"", i);
if(edict_find(h, ekey_s(keyS))) j++;
if(edict_val(h, ekey_s(keyS))) j++;
}

if(edict_len(h) != j)
Expand Down Expand Up @@ -139,7 +139,7 @@ void performance_keyI_rand_test(int scale)
{
key = (uint)eutils_rand() % scale;
tn1 = eutils_nowns();
if(edict_find(h, (ekey){key}))j++;
if(edict_val(h, (ekey){key}))j++;
tn = eutils_nowns() - tn1;

tn_total += tn;
Expand Down
2 changes: 1 addition & 1 deletion src/libs/etools/testing/erb/test_performance.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static void performance_keyS_test(uint scale)
for(i64 i = 0; i < scale; i++)
{
sprintf(keyS, "%"PRIi64"", i);
if(erb_find(h, ekey_s(keyS))) j++;
if(erb_val(h, ekey_s(keyS))) j++;
}

if(erb_len(h) != j)
Expand Down
8 changes: 4 additions & 4 deletions src/libs/etools/testing/esl/test_benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ static void performance_keyI_test(uint scale)
t = eutils_nowms();
j = 0; scale ++;
tn = eutils_nowns(); i = 0;
if(esl_find(h, (ekey){i})) j++;
if(esl_val(h, (ekey){i})) j++;
printf("find 1 \telem: %6"PRIu64"ns\n", eutils_nowns() - tn); fflush(stdout);
for(i = 1; i < scale; i++)
{
if(esl_find(h, (ekey){i})) j++;
if(esl_val(h, (ekey){i})) j++;
}

if(esl_len(h) != j)
Expand Down Expand Up @@ -95,7 +95,7 @@ static void performance_keyS_test(uint scale)
for(i64 i = 0; i < scale; i++)
{
sprintf(keyS, "%"PRIi64"", i);
if(esl_find(h, ekey_s(keyS))) j++;
if(esl_val(h, ekey_s(keyS))) j++;
}

if(esl_len(h) != j)
Expand Down Expand Up @@ -142,7 +142,7 @@ void performance_keyI_rand_test(int scale)
{
key = (uint)eutils_rand() % scale;
tn1 = eutils_nowns();
if(esl_find(h, (ekey){key}))j++;
if(esl_val(h, (ekey){key}))j++;
tn = eutils_nowns() - tn1;

tn_total += tn;
Expand Down

0 comments on commit 03b0e54

Please sign in to comment.