On macOS 12.5, I see compilation warnings:
../src/pr.c:1907:7: warning: variable 'total_lines_1' is used uninitialized
whenever '||' condition is true [-Wsometimes-uninitialized]
../src/pr.c:1907:7: warning: variable 'chars_if_truncate' is used uninitialized
whenever '||' condition is true [-Wsometimes-uninitialized]
../src/pr.c:1907:7: warning: variable 'chars_if_truncate' is used uninitialized
whenever '||' condition is true [-Wsometimes-uninitialized]
../src/pr.c:1907:7: warning: variable 'chars_if_truncate' is used uninitialized
whenever '||' condition is true [-Wsometimes-uninitialized]
and
../src/test.c:595:12: warning: variable 'value' is used uninitialized whenever
'if' condition is false [-Wsometimes-uninitialized]
../src/test.c:595:12: warning: variable 'value' is used uninitialized whenever
'&&' condition is false [-Wsometimes-uninitialized]
../src/test.c:595:12: warning: variable 'value' is used uninitialized whenever
'&&' condition is false [-Wsometimes-uninitialized]
They go away with the attached patch.
ChangeLog entry:
2023-03-14 Bruno Haible <bruno@clisp.org>
pr, test: Avoid some warning on macOS 12.
* src/pr.c (integer_overflow): Mark as _Noreturn.
* src/test.c (beyond): Mark as _Noreturn.