Skip to content

Improvement: Remove remaining warnings from Clang compilations #2103

@spenke91

Description

@spenke91

In #2068, we decided we want to make our new Clang github workflow (#2055) run with -WError. For that, we rename all instances of class to struct (#2077, #2098). The remaining three warnings are

  • one unused but set variable warning and
  • two NULL vs nullptr comparisons and

The first one is easy to fix. The second one is in there intentionally, see t8_gtest_basics.cxx

Image

My suggestion would thus be to locally ignore this warning here via

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnull-arithmetic"

/* code that triggers the warning */

#pragma GCC diagnostic pop

If that does not work for some reason, the fallback solution would be to use -WError but explicitly exclude this warning via -Wno-null-arithmetic.

Metadata

Metadata

Assignees

Labels

priority:mediumShould be solved within half a yearworkload:lowWould take half a day or less

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions