Skip to content

Commit

Permalink
warning fixes (after lgtm.com static analysis)
Browse files Browse the repository at this point in the history
  • Loading branch information
faragon committed Apr 14, 2019
1 parent 136912a commit af48e73
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/saux/sdbg.c
Expand Up @@ -189,8 +189,7 @@ void sm_log_obj(srt_string **log, const srt_map *m)


void shm_log_obj(srt_string **log, const srt_hmap *h) void shm_log_obj(srt_string **log, const srt_hmap *h)
{ {
size_t es; size_t es, i;
unsigned i;
const struct SHMBucket *b; const struct SHMBucket *b;
const struct SHMapii *e; const struct SHMapii *e;
if (!log) if (!log)
Expand All @@ -201,17 +200,18 @@ void shm_log_obj(srt_string **log, const srt_hmap *h)
case SHM0_UU32: case SHM0_UU32:
b = shm_get_buckets_r(h); b = shm_get_buckets_r(h);
e = (const struct SHMapii *)shm_get_buffer_r(h); e = (const struct SHMapii *)shm_get_buffer_r(h);
ss_cat_printf(log, 128, "hbits: %u, size: %u, max_size: %u\n", ss_cat_printf(log, 128, "hbits: %u, size: " FMT_ZU
", max_size: " FMT_ZU "\n",
h->hbits, shm_size(h), shm_max_size(h)); h->hbits, shm_size(h), shm_max_size(h));
for (i = 0; i < h->hmask + 1; i++) { for (i = 0; i < (size_t)h->hmask + 1; i++) {
ss_cat_printf(log, 128, ss_cat_printf(log, 128,
"b[%u] h: %08x " "b[" FMT_ZU "] h: %08x "
"l: %u cnt: %u\n", "l: %u cnt: %u\n",
i, b[i].hash, b[i].loc, b[i].cnt); i, b[i].hash, b[i].loc, b[i].cnt);
} }
es = shm_size(h); es = shm_size(h);
for (i = 0; i < es; i++) for (i = 0; i < es; i++)
ss_cat_printf(log, 128, "e[%u] kv: %u, %u\n", i, ss_cat_printf(log, 128, "e[" FMT_ZU "] kv: %u, %u\n", i,
e[i].x.k, e[i].v); e[i].x.k, e[i].v);
break; break;
default: default:
Expand Down
1 change: 0 additions & 1 deletion utl/c2doc.py
Expand Up @@ -102,7 +102,6 @@ def fundoc2html( doc ) :
i += 1 i += 1
proto += ')<br><br>' proto += ')<br><br>'
params = '' params = ''
nfparams = len(fun_params)
i = 0 i = 0
params += '<ul>' params += '<ul>'
params += '<li>' + fun_desc + '</li>' params += '<li>' + fun_desc + '</li>'
Expand Down

0 comments on commit af48e73

Please sign in to comment.