Skip to content

fix: resolve compiler warnings, calloc argument ordering, and typos - #537

Merged
hummeltech merged 2 commits into
openstreetmap:masterfrom
hummeltech:AddressWarnings
Nov 1, 2026
Merged

hummeltech merged 2 commits into
openstreetmap:masterfrom
hummeltech:AddressWarnings

Conversation

@hummeltech

@hummeltech hummeltech commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator
  • Swap calloc parameter order (num, size) in render_submit_queue and its unit test to match standard signature and fix calloc-transposed-args warnings.
  • Explicitly cast expected_size to int in protocol_helper unit tests to silence signed/unsigned comparison warnings.
  • Fix "Coposite" typo to "Composite" in ro_composite_tile_storage_id and update matching test assertion.
  • Add thread delay after finish_workers() in queue test to ensure asynchronous log flushing completes before Catch2 assertions run.
  • Fix const conversion warning and clarify option handling in store_memcached.c

- Swap calloc parameter order (num, size) in render_submit_queue and its unit test to match standard signature and fix calloc-transposed-args warnings.
- Explicitly cast expected_size to int in protocol_helper unit tests to silence signed/unsigned comparison warnings.
- Fix "Coposite" typo to "Composite" in ro_composite_tile_storage_id and update matching test assertion.
- Add thread delay after finish_workers() in queue test to ensure asynchronous log flushing completes before Catch2 assertions run.
@codecov

codecov Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.70%. Comparing base (c4e3e62) to head (9652ed7).
⚠️ Report is 69 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #537      +/-   ##
==========================================
+ Coverage   81.54%   89.70%   +8.16%     
==========================================
  Files          24       24              
  Lines        5645     5468     -177     
==========================================
+ Hits         4603     4905     +302     
+ Misses       1042      563     -479     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/store_memcached.c Fixed
Comment thread src/store_memcached.c Fixed
- Qualify default option string as const to eliminate ISO C++
  -Wwrite-strings warning when compiling with Catch2 tests.
- Separate heap buffer management from option string reading to ensure
  clear ownership and safe memory deallocation.
- Rename ambiguous variables (ctx, connection_str) to improve code readability.
Comment thread src/store_memcached.c

if (memcached_options_buf != NULL) {
// Strip "memcached://" scheme (12 chars) and prefix with "--server="
snprintf(memcached_options_buf, connection_string_len - 2, "--server=%.*s",
Comment thread src/store_memcached.c
g_logger(G_LOG_LEVEL_DEBUG, "init_storage_memcached: Creating memcached ctx with options '%s'", connection_str);
ctx = memcached(connection_str, strlen(connection_str));
g_logger(G_LOG_LEVEL_DEBUG, "init_storage_memcached: Creating memcached ctx with options '%s'", memcached_options);
memcached_st * memcached_storage_ctx = memcached(memcached_options, strlen(memcached_options));
@hummeltech
hummeltech merged commit df8e82d into openstreetmap:master Nov 1, 2026
39 of 40 checks passed
@hummeltech
hummeltech deleted the AddressWarnings branch November 1, 2026 02:44
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