Skip to content

Commit

Permalink
NDMP: Tweak #pragma settings.
Browse files Browse the repository at this point in the history
We try to suppress some warnings in this code as its somewhat chatty
otherwise. But it seems #pragma are only available in later GCC versions
so try to adapt to that as much as possible.
  • Loading branch information
Marco van Wieringen committed Nov 14, 2015
1 parent 924e7ba commit a878b7c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ndmp/ndmos.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@
*/
#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic ignored "-Wenum-compare"
#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 460
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#endif
#endif

#if defined(__SUNPRO_C)
Expand Down
2 changes: 2 additions & 0 deletions src/ndmp/ndmp2.x
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@

%#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402
%#pragma GCC diagnostic ignored "-Wunused-variable"
%#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 470
%#pragma GCC diagnostic ignored "-Wunprototyped-calls"
%#endif
%#endif

%#ifndef NDMOS_OPTION_NO_NDMP2

Expand Down
2 changes: 2 additions & 0 deletions src/ndmp/ndmp3.x
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@

%#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402
%#pragma GCC diagnostic ignored "-Wunused-variable"
%#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 470
%#pragma GCC diagnostic ignored "-Wunprototyped-calls"
%#endif
%#endif

%#ifndef NDMOS_OPTION_NO_NDMP3

Expand Down
2 changes: 2 additions & 0 deletions src/ndmp/ndmp4.x
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@

%#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402
%#pragma GCC diagnostic ignored "-Wunused-variable"
%#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 470
%#pragma GCC diagnostic ignored "-Wunprototyped-calls"
%#endif
%#endif

%#ifndef NDMOS_OPTION_NO_NDMP4

Expand Down
2 changes: 2 additions & 0 deletions src/ndmp/ndmp9.x
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,10 @@

%#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402
%#pragma GCC diagnostic ignored "-Wunused-variable"
%#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 470
%#pragma GCC diagnostic ignored "-Wunprototyped-calls"
%#endif
%#endif

const NDMP9VER = 9;

Expand Down

0 comments on commit a878b7c

Please sign in to comment.