Skip to content

fix: keep public headers warning-free under -Wextra; release 0.6.1 - #64

Merged
Reddimus merged 2 commits into
mainfrom
fix/header-warnings
Sep 25, 2026
Merged

Reddimus merged 2 commits into
mainfrom
fix/header-warnings

Conversation

@Reddimus

Copy link
Copy Markdown
Owner

Summary

Public headers warned under -Wextra: Error literals in error.hpp and
fixed_point.hpp left api_code uninitialized, and
-Wmissing-field-initializers reports that. A project building with
-Werror couldn't include <kalshi/kalshi.hpp>. The library's own build
turns that warning off, and the consumer check used default flags, so neither
caught it. Compiling the README's snippets against 0.6.0 did.

  • Every Error in the public headers now sets all its fields.
  • tools/test_consumers.sh builds both consumers with
    -Wall -Wextra -Wpedantic -Werror. With the header change reverted, it fails.
  • The headers are also clean under -Wshadow, -Wconversion,
    -Wsign-conversion, -Wold-style-cast, and -Wnon-virtual-dtor.
  • Version 0.6.1, with a CHANGELOG section.

Checks

  • make format lint test
  • ./tools/test_consumers.sh passes, and fails without the header fix
  • SemVer impact: patch (0.6.1)

Error literals in error.hpp and fixed_point.hpp left api_code uninitialized,
which -Wmissing-field-initializers (part of -Wextra) reports, so projects
building with -Werror could not include the headers. The consumer check now
compiles with -Wall -Wextra -Wpedantic -Werror, which catches this.
Copilot AI lite review requested due to automatic review settings September 25, 2026 13:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

README setup and snippets, CONTRIBUTING's CI and tidy notes, CLAUDE.md, the
directory READMEs, stale comments, absolute links in release notes, and a
pre-commit hook that lints instead of formatting after staging. The local
rate limiter reports http_status 0, since no server answered.
@Reddimus
Reddimus merged commit 8dfcf8d into main Sep 25, 2026
14 checks passed
@Reddimus
Reddimus deleted the fix/header-warnings branch September 25, 2026 13:33
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