[FFmpeg-devel] [PATCH] avcodec/mv30: fix warning: suggest braces around initialization of subobject [-Wmissing-braces]

Michael Niedermayer michael at niedermayer.cc
Sat May 30 21:54:56 EEST 2020


On Sat, May 30, 2020 at 01:34:03PM +0200, Nicolas George wrote:
> lance.lmwang at gmail.com (12020-05-30):
> > > -        int pfill[3][1] = { 0 };
> > > +        int pfill[3][1] = { {0} };
> 
> > will apply it tomorow if no objection.
> 
> This warning is bogus, the code is valid 

agree


> and a common pattern in FFmpeg.


> IIRC, we decided to keep it that way when it happens.

i do remember adding {} to these kind of cases so as to
eliminate the related warnings when i see one in code iam
working on at least

the reason why i tend to do that is so there are fewer meaningless
warnings, that way warnings pointing to real issues are easier to spot

if these warnings are not fixed, then ideally they should be suppressed
by some other means like compiler flags
so they do not distract from real issues

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Never trust a computer, one day, it may think you are the virus. -- Compn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200530/24468625/attachment.sig>


More information about the ffmpeg-devel mailing list