hostip: remove unused MAX_HOSTCACHE_LEN and MAX_DNS_CACHE_SIZE#21550
Closed
amitbidlan wants to merge 1 commit into
Closed
hostip: remove unused MAX_HOSTCACHE_LEN and MAX_DNS_CACHE_SIZE#21550amitbidlan wants to merge 1 commit into
amitbidlan wants to merge 1 commit into
Conversation
These macros are leftovers from when DNS caching was moved out of hostip.c into its own source file. Both are still defined and used in lib/dnscache.c; the copies in lib/hostip.c are unreferenced. Detected with clang -Wunused-macros. Follow-up to 96d5b5c
bagder
approved these changes
May 11, 2026
Member
|
Thanks! |
vszakats
added a commit
that referenced
this pull request
May 15, 2026
Also fix fallouts found. Windows clang-tidy CI job is a little pickier than I'd prefer due to the `_CURL_TESTS_CONCAT=ON` option used there, and all macros considered local, thus checked by the compiler. Upside: it revealed macro usage dynamics in tests. If too annoying, `first.h` may be opted-out from the concat logic. Some macros may also be deleted instead of `#if 0`-ing. Follow-up to e0e56e9 #21550 Follow-up to 5fa5cb3 #20593 Closes #21554
outcast36
pushed a commit
to greearb/curl
that referenced
this pull request
Jun 3, 2026
These macros are leftovers from when DNS caching was moved out of hostip.c into its own source file. Both are still defined and used in lib/dnscache.c; the copies in lib/hostip.c are unreferenced. Detected with clang -Wunused-macros. Follow-up to 96d5b5c Closes curl#21550
outcast36
pushed a commit
to greearb/curl
that referenced
this pull request
Jun 3, 2026
Also fix fallouts found. Windows clang-tidy CI job is a little pickier than I'd prefer due to the `_CURL_TESTS_CONCAT=ON` option used there, and all macros considered local, thus checked by the compiler. Upside: it revealed macro usage dynamics in tests. If too annoying, `first.h` may be opted-out from the concat logic. Some macros may also be deleted instead of `#if 0`-ing. Follow-up to e0e56e9 curl#21550 Follow-up to 5fa5cb3 curl#20593 Closes curl#21554
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.
These macros are leftovers from 96d5b5c (
dnscache: own source file, improvements) which split DNS caching out of hostip.c into lib/dnscache.c. Both macros are still defined and used in dnscache.c; the copies in hostip.c are no longer referenced anywhere.Detected by building with clang
-Wunused-macroson macOS.