libdemangle: variable 'result' might be clobbered by 'longjmp' or 'vfork'
lib - userland libraries
Build error with gcc 9:
../common/cxx.c: In function 'cpp_demangle': ../common/cxx.c:170:8: error: variable 'result' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered] 170 | char *result = NULL; | ^~~~~~ cc1: all warnings being treated as errors
Mark it volatile should do there.
Updated by Electric Monk 5 months ago
- Status changed from In Progress to Closed
commit 5eadbc30703231f9c4bae46b75a14b0abf05268c Author: Toomas Soome <email@example.com> Date: 2020-04-27T17:51:09.000Z 12155 libdemangle: variable 'result' might be clobbered by 'longjmp' or 'vfork' Reviewed by: John Levon <firstname.lastname@example.org> Reviewed by: Jason King <email@example.com> Approved by: Dan McDonald <firstname.lastname@example.org>