RedisGears / RedisGears/LibMR

Warnings on build

Open
#21 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.