[FFmpeg-cvslog] avcodec/pngenc: Remove outer () from macro

Michael Niedermayer git at videolan.org
Wed Mar 4 02:24:12 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Mar  4 02:06:08 2015 +0100| [f6f1e2b3be8fec0126ca5a87a431e2cc87bcf8e3] | committer: Michael Niedermayer

avcodec/pngenc: Remove outer () from macro

The macro is implemented as a do{}while()
enclosing this is () appears to be a GNU extension (6.1 Statements and Declarations in Expressions)
the () is also unneeded and wrong as the macro returns no
value

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f6f1e2b3be8fec0126ca5a87a431e2cc87bcf8e3
---

 libavcodec/pngenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
index 4e67ce2..6c9f43e 100644
--- a/libavcodec/pngenc.c
+++ b/libavcodec/pngenc.c
@@ -232,7 +232,7 @@ static int png_write_row(PNGEncContext *s, const uint8_t *data, int size)
     return 0;
 }
 
-#define AV_WB32_PNG(buf, n) (AV_WB32(buf, lrint((n) * 100000)))
+#define AV_WB32_PNG(buf, n) AV_WB32(buf, lrint((n) * 100000))
 static int png_get_chrm(enum AVColorPrimaries prim,  uint8_t *buf)
 {
     double rx, ry, gx, gy, bx, by, wx = 0.3127, wy = 0.3290;



More information about the ffmpeg-cvslog mailing list