You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
./argon-rtos/include/argon/ar_kernel.h:54:26: warning: ISO C restricts enumerator values to range of 'int' [-Wpedantic]
kArInfiniteTimeout = 0xffffffffUL //!< Pass this value to wait forever to acquire a resource.
static const uint32_t kArInfiniteTimeout = 0xffffffffUL; would solve this warning, do/don't? (same would apply to kArNoTimeout for consistency
The text was updated successfully, but these errors were encountered:
The problem with using a static const for kArInfiniteTimeout and kArNoTimeout is that in C it would allocate storage (in .rodata) for these values. I'll look at this one and see if I can come up with something.
One option I've seen before is to cast the enum value to int, as in:
enum {
kArInfiniteTimeout= (int)0xffffffffL,
};
But a quick test in Argon causes gcc 7.3.1 to report "comparison between signed and unsigned integer expressions" when comparing timeout parameters with this enum. So it needs more investigation.
Unfortunately, even moving to require C++11 or later wouldn't help here, since this is in the C API header ar_kernel.h.
(Issue reported by @diggit.)
There is one more warning:
static const uint32_t kArInfiniteTimeout = 0xffffffffUL;
would solve this warning, do/don't? (same would apply to kArNoTimeout for consistencyThe text was updated successfully, but these errors were encountered: