diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2011-05-02 10:34:06 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2011-05-02 10:34:06 +0000 |
commit | a02107cd67ca6715ca176e6939d636ff25f43f32 (patch) | |
tree | a73fcc1f164c068245eb8049b63fb3cc27759552 /src/mpfr-impl.h | |
parent | 2b4640029fe184cff14f8fce150c55c275e8f69d (diff) | |
download | mpfr-a02107cd67ca6715ca176e6939d636ff25f43f32.tar.gz |
[src/mpfr-impl.h] Avoid a spurious warning with some use of MPFR_BLOCK.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7646 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/mpfr-impl.h')
-rw-r--r-- | src/mpfr-impl.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mpfr-impl.h b/src/mpfr-impl.h index 39b7741ba..2564318af 100644 --- a/src/mpfr-impl.h +++ b/src/mpfr-impl.h @@ -325,12 +325,16 @@ __MPFR_DECLSPEC extern const mpfr_t __gmpfr_four; MPFR_BLOCK_EXCEP should be used only inside a block; it is useful to detect some exception in order to exit the block as soon as possible. */ #define MPFR_BLOCK_DECL(_flags) unsigned int _flags +/* The (void) (_flags) makes sure that _flags is read at least once (it + makes sense to use MPFR_BLOCK while _flags will never be read in the + source, so that we wish to avoid the corresponding warning). */ #define MPFR_BLOCK(_flags,_op) \ do \ { \ mpfr_clear_flags (); \ _op; \ (_flags) = __gmpfr_flags; \ + (void) (_flags); \ } \ while (0) #define MPFR_BLOCK_TEST(_flags,_f) MPFR_UNLIKELY ((_flags) & (_f)) |