emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 6e2e7265a04: Prefer static switch-case checking in pdumper


From: Pip Cet
Subject: Re: master 6e2e7265a04: Prefer static switch-case checking in pdumper
Date: Sun, 26 Jan 2025 20:22:41 +0000

"Stefan Kangas" <stefankangas@gmail.com> writes:

> branch: master
> commit 6e2e7265a04f63f482db7fbdfd8e2519d8bfe03e
> Author: Stefan Kangas <stefankangas@gmail.com>
> Commit: Stefan Kangas <stefankangas@gmail.com>
>
>     Prefer static switch-case checking in pdumper

This change causes many compiler warnings (current gcc, CFLAGS=-O2):

pdumper.c:4726:15: warning: ‘mem_flags’ may be used uninitialized 
[-Wmaybe-uninitialized]
 4726 |     mem_flags |= MAP_FIXED;
      |               ^

Such warnings will not usually appear in -O0 builds.

I'm also not sure that this is what is meant by static checking.  As
discussed before, GCC will not assume that the switch value is in the
enum just because of its type, and treats the fall-through code as
reachable if it doesn't abort.

Pip




reply via email to

[Prev in Thread] Current Thread [Next in Thread]