emacs-devel
[Top][All Lists]
Advanced

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

Two compiler warnings on master


From: martin rudalics
Subject: Two compiler warnings on master
Date: Thu, 30 Jan 2025 09:31:57 +0100
User-agent: Mozilla Thunderbird

Since a couple of days building master with gcc 12.2.0 gets me

In function ‘dump_write’,
    inlined from ‘dump_do_fixup’ at ../../src/pdumper.c:4062:5,
    inlined from ‘dump_do_fixups’ at ../../src/pdumper.c:4076:7,
    inlined from ‘Fdump_emacs_portable’ at ../../src/pdumper.c:4342:3:
../../src/pdumper.c:783:3: warning: ‘dump_value’ may be used uninitialized 
[-Wmaybe-uninitialized]
  783 |   memcpy ((char *)ctx->buf + ctx->offset, buf, nbyte);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/pdumper.c: In function ‘Fdump_emacs_portable’:
../../src/pdumper.c:3993:12: note: ‘dump_value’ was declared here
 3993 |   intptr_t dump_value;
      |            ^~~~~~~~~~

Is the compiler wrong?

And a warning I see for quite some time already is

../../src/eval.c: In function ‘internal_catch_all’:
../../src/eval.c:1737:19: warning: variable ‘c’ might be clobbered by ‘longjmp’ 
or ‘vfork’ [-Wclobbered]
 1737 |   struct handler *c = handlerlist->nextfree;
      |                   ^

To be ignored?

Thanks, martin

reply via email to

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