-
Andre Maroneze authored
Clang 13 emits warnings related to uninitialized variables: variable 'r' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] This is due to the fact that the assert(0) macro, when using Frama-C's libc, is expanded to __FC_assert. Since it is not known by the compiler, it cannot consider it as "noreturn" when the condition is zero. Note that adding '__attribute__ ((__noreturn__))' will not work: Frama-C will assume it never returns, even when the condition is true. Initializing the 'r' variables with a default value will not change the actual behavior, and will avoid the warnings.
Andre Maroneze authoredClang 13 emits warnings related to uninitialized variables: variable 'r' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] This is due to the fact that the assert(0) macro, when using Frama-C's libc, is expanded to __FC_assert. Since it is not known by the compiler, it cannot consider it as "noreturn" when the condition is zero. Note that adding '__attribute__ ((__noreturn__))' will not work: Frama-C will assume it never returns, even when the condition is true. Initializing the 'r' variables with a default value will not change the actual behavior, and will avoid the warnings.