[Tinyos-devel] compile warnings with CTP without senders

Omprakash Gnawali gnawali at usc.edu
Sat Apr 18 14:30:57 PDT 2009


When CTP is used without a sender (eg. CTP root), CLIENT_COUNT (which
is a uniqeCount on the number of senders) is 0. Because CLIENT_COUNT
is 0, there are three tests that result in compiler warning:

Example:

        if (qe->client < CLIENT_COUNT) {

"comparison is always false due to limited range of data type".

In the test above test, "client" is of type uint8_t so the warning makes sense.

Is there a way to disable this warning in this specific scenario?
Maybe customize the warning if CLIENT_COUNT == 0?

Thanks to Razvan for reporting these warnings.

- om_p


More information about the Tinyos-devel mailing list