Skip to content

Commit 2ea96a1

Browse files
committed
variable reassigned a value before the old one has been used
Detected by Cppcheck 1.74.
1 parent 16d5810 commit 2ea96a1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

time_unix.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ kt_setfreq(struct ocx *ocx, double frequency)
9090

9191
tx.status = STA_PLL | STA_FREQHOLD;
9292
tx.modes = MOD_FREQUENCY;
93+
/* [time_unix.c:84] -> [time_unix.c:92]:
94+
* (style) Variable 'modes' is reassigned a value
95+
* before the old one has been used. */
9396
tx.freq = (long)floor(frequency * (65536 * 1e6));
9497
errno = 0;
9598
i = ntp_adjtime(&tx);

0 commit comments

Comments
 (0)