diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2020-02-26 16:50:34 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2020-02-26 16:59:56 +0100 |
commit | 28382c97a5d5fd7366adbf7ce9445b1b4beb02a9 (patch) | |
tree | c09b0995abdf787f263e3aea065b672d2c04a7ab | |
parent | 4653cc92ed509b8f9b340b16920e8cb683c85f40 (diff) | |
download | cygnal-28382c97a5d5fd7366adbf7ce9445b1b4beb02a9.tar.gz cygnal-28382c97a5d5fd7366adbf7ce9445b1b4beb02a9.tar.bz2 cygnal-28382c97a5d5fd7366adbf7ce9445b1b4beb02a9.zip |
Cygwin: posix timers: fix uninitialized variable
The variable returning the overrun count from the tracker object after
disarming the overrun counter was not correctly initialized. For some
reason this has only been noticed by gcc-9.2.0, not by the formerly used
gcc-7.4.0.
This problem should not have had any runtime impact. The method
timer_tracker::disarm_overrun_event is supposed to be called in
lock-step with timer_tracker::arm_overrun_event, which in turn
results in the variable getting a valid value.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r-- | winsup/cygwin/posix_timer.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/posix_timer.cc b/winsup/cygwin/posix_timer.cc index c0d548fe9..75cd4fa60 100644 --- a/winsup/cygwin/posix_timer.cc +++ b/winsup/cygwin/posix_timer.cc @@ -81,7 +81,7 @@ timer_tracker::arm_overrun_event (LONG64 exp_cnt) LONG timer_tracker::disarm_overrun_event () { - LONG ret; + LONG ret = 0; AcquireSRWLockExclusive (&srwlock); if (overrun_count != OVR_DISARMED) |