GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: fix warning in cares_wrap.cc · nodejs/node@f62e35f

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • cares_wrap.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/cares_wrap.cc‎

Copy file name to clipboardExpand all lines: src/cares_wrap.cc
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,15 +1212,15 @@ class QueryAnyWrap: public QueryWrap {
12121212
ret,
12131213
addrttls,
12141214
&naddrttls);
1215-
int a_count = ret->Length();
1215+
uint32_t a_count = ret->Length();
12161216
if (status != ARES_SUCCESS && status != ARES_ENODATA) {
12171217
ParseError(status);
12181218
return;
12191219
}
12201220

12211221
if (type == ns_t_a) {
1222-
CHECK_EQ(naddrttls, a_count);
1223-
for (int i = 0; i < a_count; i++) {
1222+
CHECK_EQ(static_cast<uint32_t>(naddrttls), a_count);
1223+
for (uint32_t i = 0; i < a_count; i++) {
12241224
Local<Object> obj = Object::New(env()->isolate());
12251225
obj->Set(context,
12261226
env()->address_string(),
@@ -1234,7 +1234,7 @@ class QueryAnyWrap: public QueryWrap {
12341234
ret->Set(context, i, obj).FromJust();
12351235
}
12361236
} else {
1237-
for (int i = 0; i < a_count; i++) {
1237+
for (uint32_t i = 0; i < a_count; i++) {
12381238
Local<Object> obj = Object::New(env()->isolate());
12391239
obj->Set(context,
12401240
env()->value_string(),
@@ -1258,13 +1258,13 @@ class QueryAnyWrap: public QueryWrap {
12581258
ret,
12591259
addr6ttls,
12601260
&naddr6ttls);
1261-
int aaaa_count = ret->Length() - a_count;
1261+
uint32_t aaaa_count = ret->Length() - a_count;
12621262
if (status != ARES_SUCCESS && status != ARES_ENODATA) {
12631263
ParseError(status);
12641264
return;
12651265
}
12661266

1267-
CHECK_EQ(aaaa_count, naddr6ttls);
1267+
CHECK_EQ(aaaa_count, static_cast<uint32_t>(naddr6ttls));
12681268
CHECK_EQ(ret->Length(), a_count + aaaa_count);
12691269
for (uint32_t i = a_count; i < ret->Length(); i++) {
12701270
Local<Object> obj = Object::New(env()->isolate());

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.