Warnings on build
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 5
- Forks
- 6
- Avg merge
- 3h 52m
- Merged PRs (30d)
- 1
Description
libmr_commands.c: In function ‘check_and_reply_on_error’:
libmr_commands.c:20:13: warning: format not a string literal and no format arguments [-Wformat-security]
20 | RedisModule_Log(rctx, "verbose", MR_ExecutionCtxGetError(eCtx, i));
| ^~~~~~~~~~~~~~~
rdb.c: In function ‘series_rdb_load’:
rdb.c:120:30: warning: ‘totalSamples’ may be used uninitialized in this function [-Wmaybe-uninitialized]
120 | series->totalSamples = totalSamples;
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
rdb.c:124:31: warning: ‘lastTimestamp’ may be used uninitialized in this function [-Wmaybe-uninitialized]
124 | series->lastTimestamp = lastTimestamp;
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
rdb.c:125:27: warning: ‘lastValue’ may be used uninitialized in this function [-Wmaybe-uninitialized]
125 | series->lastValue = lastValue;
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the warning sites in libmr_commands.c:20 and rdb.c:120-125, especially check_and_reply_on_error and series_rdb_load. Rebuild the project with the reported compiler warnings enabled and verify that the format-security and possible-uninitialized warnings no longer appear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100