[vlc-devel] [vlc-commits] imem: fix warning

Steve Lhomme robux4 at gmail.com
Tue Jul 25 09:06:00 CEST 2017


On Tue, Jul 25, 2017 at 8:07 AM, Tristan Matthews <tmatth at videolan.org> wrote:
> On Tue, Jul 25, 2017 at 1:34 AM, Steve Lhomme <robux4 at gmail.com> wrote:
>> On Mon, Jul 24, 2017 at 6:32 PM, Rémi Denis-Courmont <git at videolan.org> wrote:
>>> vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jul 24 19:19:00 2017 +0300| [5efc79cf91cfb9b151e7e47de3a4f589116293df] | committer: Rémi Denis-Courmont
>>>
>>> imem: fix warning
>>>
>>>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5efc79cf91cfb9b151e7e47de3a4f589116293df
>>> ---
>>>
>>>  modules/access/imem.c | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/modules/access/imem.c b/modules/access/imem.c
>>> index 08426eafde..09a74f1c15 100644
>>> --- a/modules/access/imem.c
>>> +++ b/modules/access/imem.c
>>> @@ -403,6 +403,7 @@ static inline int GetCategory(vlc_object_t *object)
>>>          return SPU_ES;
>>>      default:
>>>          msg_Err(object, "Invalid ES category");
>>> +        /* fall through */
>>
>> How does adding a comment "fix a warning" ?
>
> See e.g., "-Wimplicit-fallthrough=3" in gcc-7. [1]

So now rather than telling the compiler explicitly what we want, we
let it guesstimate via comments ? That's very odd.

> Best,
> -t
>
> [1] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
>
>>
>>>      case 4:
>>>          return UNKNOWN_ES;
>>>      }
>>>
>>> _______________________________________________
>>> vlc-commits mailing list
>>> vlc-commits at videolan.org
>>> https://mailman.videolan.org/listinfo/vlc-commits
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list