fix: keep public headers warning-free under -Wextra; release 0.6.1 - #64
Merged
Merged
Conversation
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Public headers warned under
-Wextra:Errorliterals inerror.hppandfixed_point.hppleftapi_codeuninitialized, and-Wmissing-field-initializersreports that. A project building with-Werrorcouldn't include<kalshi/kalshi.hpp>. The library's own buildturns that warning off, and the consumer check used default flags, so neither
caught it. Compiling the README's snippets against 0.6.0 did.
Errorin the public headers now sets all its fields.tools/test_consumers.shbuilds both consumers with-Wall -Wextra -Wpedantic -Werror. With the header change reverted, it fails.-Wshadow,-Wconversion,-Wsign-conversion,-Wold-style-cast, and-Wnon-virtual-dtor.Checks
make format lint test./tools/test_consumers.shpasses, and fails without the header fix