Skip to content

Commit

Permalink
Fix errors found in CI
Browse files Browse the repository at this point in the history
 * fix ci.yml whitespace, from yamlint
 * fix defrag.c, from -Werror

Signed-off-by: Evan Wies <[email protected]>
  • Loading branch information
neomantra committed Nov 2, 2024
1 parent ce8efa3 commit 489db63
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
- name: unit tests
run: |
./src/valkey-unit-tests
build-debian-old:
runs-on: ubuntu-latest
container: debian:buster
Expand Down
6 changes: 6 additions & 0 deletions src/defrag.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ robj *activeDefragStringOb(robj *ob) {
return activeDefragStringObEx(ob, 1);
}

#ifdef USE_LUA
/* Defrag helper for lua scripts
*
* returns NULL in case the allocation wasn't moved.
Expand All @@ -189,6 +190,7 @@ luaScript *activeDefragLuaScript(luaScript *script) {

return ret;
}
#endif

/* Defrag helper for dict main allocations (dict struct, and hash tables).
* Receives a pointer to the dict* and return a new dict* when the dict
Expand Down Expand Up @@ -302,7 +304,9 @@ void activeDefragSdsDict(dict *d, int val_type) {
.defragVal = (val_type == DEFRAG_SDS_DICT_VAL_IS_SDS ? (dictDefragAllocFunction *)activeDefragSds
: val_type == DEFRAG_SDS_DICT_VAL_IS_STROB ? (dictDefragAllocFunction *)activeDefragStringOb
: val_type == DEFRAG_SDS_DICT_VAL_VOID_PTR ? (dictDefragAllocFunction *)activeDefragAlloc
#ifdef USE_LUA
: val_type == DEFRAG_SDS_DICT_VAL_LUA_SCRIPT ? (dictDefragAllocFunction *)activeDefragLuaScript
#endif
: NULL)};
do {
cursor = dictScanDefrag(d, cursor, activeDefragSdsDictCallback, &defragfns, NULL);
Expand Down Expand Up @@ -812,7 +816,9 @@ void defragOtherGlobals(void) {
/* there are many more pointers to defrag (e.g. client argv, output / aof buffers, etc.
* but we assume most of these are short lived, we only need to defrag allocations
* that remain static for a long time */
#ifdef USE_LUA
activeDefragSdsDict(evalScriptsDict(), DEFRAG_SDS_DICT_VAL_LUA_SCRIPT);
#endif
moduleDefragGlobals();
kvstoreDictLUTDefrag(server.pubsub_channels, dictDefragTables);
kvstoreDictLUTDefrag(server.pubsubshard_channels, dictDefragTables);
Expand Down

0 comments on commit 489db63

Please sign in to comment.