Skip to content

Commit

Permalink
pragmass removed from osmium code
Browse files Browse the repository at this point in the history
  • Loading branch information
ischlo committed Oct 30, 2024
1 parent d3da36b commit c37c810
Show file tree
Hide file tree
Showing 6 changed files with 513 additions and 518 deletions.
6 changes: 3 additions & 3 deletions src/libosmium/include/osmium/area/problem_reporter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ namespace osmium {

// Disable "unused-parameter" warning, so that the compiler will not complain.
// We can't remove the parameter names, because then doxygen will complain.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
// #pragma GCC diagnostic push
// #pragma GCC diagnostic ignored "-Wunused-parameter"

/**
* Report a duplicate node, ie. two nodes with the same location.
Expand Down Expand Up @@ -237,7 +237,7 @@ namespace osmium {
virtual void report_way(const osmium::Way& way) {
}

#pragma GCC diagnostic pop
// #pragma GCC diagnostic pop

}; // class ProblemReporter

Expand Down
7 changes: 4 additions & 3 deletions src/libosmium/include/osmium/geom/coordinates.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,11 @@ namespace osmium {
if (!lhs.valid() && !rhs.valid()) {
return true;
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"

// #pragma GCC diagnostic push
// #pragma GCC diagnostic ignored "-Wfloat-equal"
return lhs.x == rhs.x && lhs.y == rhs.y;
#pragma GCC diagnostic pop
// #pragma GCC diagnostic pop
}

inline bool operator!=(const Coordinates& lhs, const Coordinates& rhs) noexcept {
Expand Down
14 changes: 9 additions & 5 deletions src/libosmium/include/osmium/io/detail/debug_output_format.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,16 @@ namespace osmium {

void write_counter(int width, int n) {
write_color(color_white);
#pragma GCC diagnostic push
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ > 7)
#pragma GCC diagnostic ignored "-Wformat-truncation"
#endif

// #pragma GCC diagnostic push
//
// #if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ > 7)
// #pragma GCC diagnostic ignored "-Wformat-truncation"
// #endif
output_formatted(" %0*d: ", width, n++);
#pragma GCC diagnostic pop

// #pragma GCC diagnostic pop

write_color(color_reset);
}

Expand Down
6 changes: 3 additions & 3 deletions src/libosmium/include/osmium/io/reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,12 @@ namespace osmium {
if (m_childpid) {
int status = 0;
const pid_t pid = ::waitpid(m_childpid, &status, 0);
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wold-style-cast"
// #pragma GCC diagnostic push
// #pragma GCC diagnostic ignored "-Wold-style-cast"
if (pid < 0 || !WIFEXITED(status) || WEXITSTATUS(status) != 0) { // NOLINT(hicpp-signed-bitwise)
throw std::system_error{errno, std::system_category(), "subprocess returned error"};
}
#pragma GCC diagnostic pop
// #pragma GCC diagnostic pop
m_childpid = 0;
}
#endif
Expand Down
Loading

0 comments on commit c37c810

Please sign in to comment.