Skip to content

dns: address compile-time warnings#64355

Open
aduh95 wants to merge 2 commits into
nodejs:mainfrom
aduh95:dns-c-ares-warnings
Open

dns: address compile-time warnings#64355
aduh95 wants to merge 2 commits into
nodejs:mainfrom
aduh95:dns-c-ares-warnings

Conversation

@aduh95

@aduh95 aduh95 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor
../../src/cares_wrap.cc:227:16: warning: 'ares_parse_a_reply' is deprecated: Use ares_dns_parse instead [-Wdeprecated-declarations]
  227 |       status = ares_parse_a_reply(buf,
      |                ^
/nix/store/655p6if1xf6r88nnr876x7xmclflyx2z-c-ares-1.34.7-dev/include/ares.h:1098:14: note: 'ares_parse_a_reply' has been explicitly marked deprecated here
 1098 | CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_a_reply(
      |              ^
/nix/store/655p6if1xf6r88nnr876x7xmclflyx2z-c-ares-1.34.7-dev/include/ares.h:153:22: note: expanded from macro 'CARES_DEPRECATED_FOR'
  153 |       __attribute__((deprecated("Use " #f " instead")))
      |                      ^
../../src/cares_wrap.cc:234:16: warning: 'ares_parse_aaaa_reply' is deprecated: Use ares_dns_parse instead [-Wdeprecated-declarations]
  234 |       status = ares_parse_aaaa_reply(buf,
      |                ^
/nix/store/655p6if1xf6r88nnr876x7xmclflyx2z-c-ares-1.34.7-dev/include/ares.h:1102:14: note: 'ares_parse_aaaa_reply' has been explicitly marked deprecated here
 1102 | CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_aaaa_reply(
      |              ^
/nix/store/655p6if1xf6r88nnr876x7xmclflyx2z-c-ares-1.34.7-dev/include/ares.h:153:22: note: expanded from macro 'CARES_DEPRECATED_FOR'
  153 |       __attribute__((deprecated("Use " #f " instead")))
      |                      ^
../../src/cares_wrap.cc:241:16: warning: 'ares_parse_ns_reply' is deprecated: Use ares_dns_parse instead [-Wdeprecated-declarations]
  241 |       status = ares_parse_ns_reply(buf, len, &host);
      |                ^
/nix/store/655p6if1xf6r88nnr876x7xmclflyx2z-c-ares-1.34.7-dev/include/ares.h:1113:14: note: 'ares_parse_ns_reply' has been explicitly marked deprecated here
 1113 | CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_ns_reply(
      |              ^
/nix/store/655p6if1xf6r88nnr876x7xmclflyx2z-c-ares-1.34.7-dev/include/ares.h:153:22: note: expanded from macro 'CARES_DEPRECATED_FOR'
  153 |       __attribute__((deprecated("Use " #f " instead")))
      |                      ^
../../src/cares_wrap.cc:244:16: warning: 'ares_parse_ptr_reply' is deprecated: Use ares_dns_parse instead [-Wdeprecated-declarations]
  244 |       status = ares_parse_ptr_reply(buf, len, nullptr, 0, AF_INET, &host);
      |                ^
/nix/store/655p6if1xf6r88nnr876x7xmclflyx2z-c-ares-1.34.7-dev/include/ares.h:1109:14: note: 'ares_parse_ptr_reply' has been explicitly marked deprecated here
 1109 | CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_ptr_reply(
      |              ^
/nix/store/655p6if1xf6r88nnr876x7xmclflyx2z-c-ares-1.34.7-dev/include/ares.h:153:22: note: expanded from macro 'CARES_DEPRECATED_FOR'
  153 |       __attribute__((deprecated("Use " #f " instead")))
      |                      ^
../../src/cares_wrap.cc:320:16: warning: 'ares_parse_mx_reply' is deprecated: Use ares_dns_parse instead [-Wdeprecated-declarations]
  320 |   int status = ares_parse_mx_reply(buf, len, &mx_start);
      |                ^
/nix/store/655p6if1xf6r88nnr876x7xmclflyx2z-c-ares-1.34.7-dev/include/ares.h:1119:14: note: 'ares_parse_mx_reply' has been explicitly marked deprecated here
 1119 | CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_mx_reply(
      |              ^
/nix/store/655p6if1xf6r88nnr876x7xmclflyx2z-c-ares-1.34.7-dev/include/ares.h:153:22: note: expanded from macro 'CARES_DEPRECATED_FOR'
  153 |       __attribute__((deprecated("Use " #f " instead")))
      |                      ^
../../src/cares_wrap.cc:366:16: warning: 'ares_parse_caa_reply' is deprecated: Use ares_dns_parse instead [-Wdeprecated-declarations]
  366 |   int status = ares_parse_caa_reply(buf, len, &caa_start);
      |                ^
/nix/store/655p6if1xf6r88nnr876x7xmclflyx2z-c-ares-1.34.7-dev/include/ares.h:1106:14: note: 'ares_parse_caa_reply' has been explicitly marked deprecated here
 1106 | CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_caa_reply(
      |              ^
/nix/store/655p6if1xf6r88nnr876x7xmclflyx2z-c-ares-1.34.7-dev/include/ares.h:153:22: note: expanded from macro 'CARES_DEPRECATED_FOR'
  153 |       __attribute__((deprecated("Use " #f " instead")))
      |                      ^
../../src/cares_wrap.cc:494:16: warning: 'ares_parse_txt_reply_ext' is deprecated: Use ares_dns_parse instead [-Wdeprecated-declarations]
  494 |   int status = ares_parse_txt_reply_ext(buf, len, &txt_out);
      |                ^
/nix/store/655p6if1xf6r88nnr876x7xmclflyx2z-c-ares-1.34.7-dev/include/ares.h:1125:14: note: 'ares_parse_txt_reply_ext' has been explicitly marked deprecated here
 1125 | CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_txt_reply_ext(
      |              ^
/nix/store/655p6if1xf6r88nnr876x7xmclflyx2z-c-ares-1.34.7-dev/include/ares.h:153:22: note: expanded from macro 'CARES_DEPRECATED_FOR'
  153 |       __attribute__((deprecated("Use " #f " instead")))
      |                      ^
../../src/cares_wrap.cc:581:16: warning: 'ares_parse_srv_reply' is deprecated: Use ares_dns_parse instead [-Wdeprecated-declarations]
  581 |   int status = ares_parse_srv_reply(buf, len, &srv_start);
      |                ^
/nix/store/655p6if1xf6r88nnr876x7xmclflyx2z-c-ares-1.34.7-dev/include/ares.h:1116:14: note: 'ares_parse_srv_reply' has been explicitly marked deprecated here
 1116 | CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_srv_reply(
      |              ^
/nix/store/655p6if1xf6r88nnr876x7xmclflyx2z-c-ares-1.34.7-dev/include/ares.h:153:22: note: expanded from macro 'CARES_DEPRECATED_FOR'
  153 |       __attribute__((deprecated("Use " #f " instead")))
      |                      ^
../../src/cares_wrap.cc:636:16: warning: 'ares_parse_naptr_reply' is deprecated: Use ares_dns_parse instead [-Wdeprecated-declarations]
  636 |   int status = ares_parse_naptr_reply(buf, len, &naptr_start);
      |                ^
/nix/store/655p6if1xf6r88nnr876x7xmclflyx2z-c-ares-1.34.7-dev/include/ares.h:1128:14: note: 'ares_parse_naptr_reply' has been explicitly marked deprecated here
 1128 | CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_naptr_reply(
      |              ^
/nix/store/655p6if1xf6r88nnr876x7xmclflyx2z-c-ares-1.34.7-dev/include/ares.h:153:22: note: expanded from macro 'CARES_DEPRECATED_FOR'
  153 |       __attribute__((deprecated("Use " #f " instead")))
      |                      ^
../../src/cares_wrap.cc:984:3: warning: 'ares_get_servers_ports' is deprecated: Use ares_get_servers_csv instead [-Wdeprecated-declarations]
  984 |   ares_get_servers_ports(channel_, &servers);
      |   ^
/nix/store/655p6if1xf6r88nnr876x7xmclflyx2z-c-ares-1.34.7-dev/include/ares.h:1187:1: note: 'ares_get_servers_ports' has been explicitly marked deprecated here
 1187 | CARES_DEPRECATED_FOR(ares_get_servers_csv)
      | ^
/nix/store/655p6if1xf6r88nnr876x7xmclflyx2z-c-ares-1.34.7-dev/include/ares.h:153:22: note: expanded from macro 'CARES_DEPRECATED_FOR'
  153 |       __attribute__((deprecated("Use " #f " instead")))
      |                      ^
../../src/cares_wrap.cc:1688:16: warning: 'ares_parse_soa_reply' is deprecated: Use ares_dns_parse instead [-Wdeprecated-declarations]
 1688 |   int status = ares_parse_soa_reply(buf, len, &soa_out);
      |                ^
/nix/store/655p6if1xf6r88nnr876x7xmclflyx2z-c-ares-1.34.7-dev/include/ares.h:1131:14: note: 'ares_parse_soa_reply' has been explicitly marked deprecated here
 1131 | CARES_EXTERN CARES_DEPRECATED_FOR(ares_dns_parse) int ares_parse_soa_reply(
      |              ^
/nix/store/655p6if1xf6r88nnr876x7xmclflyx2z-c-ares-1.34.7-dev/include/ares.h:153:22: note: expanded from macro 'CARES_DEPRECATED_FOR'
  153 |       __attribute__((deprecated("Use " #f " instead")))
      |                      ^

The 2 remaining warnings are ares_set_servers / ares_set_servers_ports in setServers(), which IIUC would require a breaking change to address.

N.B.: this is mostly vibe-coded

Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. cares Issues and PRs related to the c-ares dependency or the cares_wrap binding. needs-ci PRs that need a full CI run. labels Jul 8, 2026
@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 69.68641% with 87 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.24%. Comparing base (1d87a24) to head (71e5a4b).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
src/cares_wrap.cc 69.68% 47 Missing and 40 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64355      +/-   ##
==========================================
- Coverage   90.25%   90.24%   -0.02%     
==========================================
  Files         741      741              
  Lines      240990   241113     +123     
  Branches    45402    45441      +39     
==========================================
+ Hits       217502   217587      +85     
- Misses      15066    15067       +1     
- Partials     8422     8459      +37     
Files with missing lines Coverage Δ
src/cares_wrap.cc 62.91% <69.68%> (+1.26%) ⬆️

... and 30 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Jul 8, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 8, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. cares Issues and PRs related to the c-ares dependency or the cares_wrap binding. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants