RTEMS | kern_ntptime.c: Negative Shift Value Warning (#5339)
Joel Sherrill (@joel)
gitlab at rtems.org
Tue Sep 16 17:48:37 UTC 2025
Joel Sherrill created an issue: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5339
## Summary
The following warning is generated on every target.
```
../../../cpukit/score/src/kern_ntptime.c:122:50: warning: left shift of negative value [-Wshift-negative-value]
../../../cpukit/score/src/kern_ntptime.c:124:45: warning: left shift of negative value [-Wshift-negative-value]
```
The code in question is included. The true path is line 122.
```
#define L_LINT(v, a) \
do { \
if ((a) < 0) \
((v) = -((int64_t)(-(a)) << 32)); \
else \
((v) = (int64_t)(a) << 32); \
} while (0)
```
### Pre-set options
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5339
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250916/a7c011b1/attachment.htm>
More information about the bugs
mailing list