Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix argument types of formatting functions #1253

Open
wants to merge 1 commit into
base: unstable
Choose a base branch
from

Conversation

ArtSin
Copy link

@ArtSin ArtSin commented Nov 4, 2024

cluster_legacy.c: slot_info_pairs has uint16_t values, but they were cast to unsigned long and %i was used.

valkey-cli.c: node->replicas_count is int, not unsigned long.

Copy link

codecov bot commented Nov 4, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 70.68%. Comparing base (a102852) to head (e78d9eb).
Report is 2 commits behind head on unstable.

Files with missing lines Patch % Lines
src/valkey-cli.c 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1253      +/-   ##
============================================
- Coverage     70.70%   70.68%   -0.02%     
============================================
  Files           114      114              
  Lines         63157    63158       +1     
============================================
- Hits          44653    44644       -9     
- Misses        18504    18514      +10     
Files with missing lines Coverage Δ
src/cluster_legacy.c 86.22% <100.00%> (-0.10%) ⬇️
src/valkey-cli.c 55.55% <0.00%> (+0.06%) ⬆️

... and 11 files with indirect coverage changes

@@ -1131,7 +1131,7 @@ static void json_decode_descend(lua_State *l, json_parse_t *json, int slots)

strbuf_free(json->tmp);
luaL_error(l, "Found too many nested data structures (%d) at character %d",
json->current_depth, json->ptr - json->data);
json->current_depth, (int)(json->ptr - json->data));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather leave lua alone if we can.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I know, but it's a vendored dependency and we would prefer it stay as it is upstream.

`cluster_legacy.c`: `slot_info_pairs` has `uint16_t` values, but they were cast to `unsigned long` and `%i` was used.

`valkey-cli.c`: `node->replicas_count` is `int`, not `unsigned long`.

Signed-off-by: ArtSin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants