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 about 2 years ago
- Status changed from In Progress to Closed
commit 5eadbc30703231f9c4bae46b75a14b0abf05268c Author: Toomas Soome <firstname.lastname@example.org> Date: 2020-04-27T17:51:09.000Z 12155 libdemangle: variable 'result' might be clobbered by 'longjmp' or 'vfork' Reviewed by: John Levon <email@example.com> Reviewed by: Jason King <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>