Skip to content

Fix uninitialized var errors

Cyril Hrubis ltp 1 version New

Get series with b4
b4 am YNHrldS4vrr2BN/t@yuki

Versions newest first

  1. v1 Latest0 of 8 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 8 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [LTP] [PATCH 0/8] Fix uninitialized var errors

Hi!

Quoted 6 lines

In a lot of cases the compiler is simply confused and gives an error, but there is no undefined behaviour. This is often caused by tst_brk which is the source of much confusion. Most likely there should be two versions of tst_brk. One which never returns and is used by test authors and one which can return, but is usually only used in library functions which may be called from cleanup.

Having two tst_brk() wouldn't solve much since all SAFE_MACROS() still needs to use the one that may return.

So as far as I can tell it's easier to initialize variables to 0 in the few cases where compiler ends up confused.

Anyways whole patchset pushed, thanks.

Signature · 2 lines
Cyril Hrubis
[email protected]