Skip to content

Conversation

@jgallagher59701
Copy link
Member

I fixed a number of warning in the libdap4 repo's code.

@sonarqubecloud
Copy link

Copy link
Contributor

@sawer297 sawer297 left a comment

Choose a reason for hiding this comment

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

looks good
approved

@jgallagher59701 jgallagher59701 merged commit 16b1de8 into master Jan 27, 2026
5 checks passed
*/
xdrproc_t XDRUtils::xdr_coder(const Type &t) {
switch (t) {
A_cast_function_type_mismatch switch (t) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I found "A_cast_function_type_mismatch" is defined at diagnostic_supporession.h
as ```
#define A_cast_function_type_mismatch
It is not obvious what it is doing. Could you add a comment to explain what it is doing or point to diagnostic_suppression.h for further reference.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right. I'll do that.

}

return NULL;
A_Pop return nullptr;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same comment as the above for A_pop.

BaseType *bt = fs.var("fsab");
CPPUNIT_ASSERT(bt);
Array *fsarr_p = dynamic_cast<Array *>(bt);
auto *fsarr_p = dynamic_cast<Array *>(bt);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why here it is auto * but in line 984, it is auto?

CPPUNIT_ASSERT(ui16_p);
CPPUNIT_ASSERT(ui16_p->value() == ui16->value());
Url *url_p = dynamic_cast<Url *>((*row_sub)[1]);
auto *url_p = dynamic_cast<Url *>((*row_sub)[1]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I still don't understand why not using" auto" rather than "auto *".

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree, maybe I should clean that up. It would be more consistent. Either is correct syntax and they mean the same thing, but for consistency, it would be better to always use one syntax.

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.

4 participants