MQTTSNSerializePublish.c: In function 'MQTTSNSerialize_register':
MQTTSNSerializePublish.c:235:70: warning: signed and unsigned type in conditional expression [-Wsign-compare]
topicnamelen = (topicname->cstring) ? strlen(topicname->cstring) : topicname->lenstring.len;
Hi, I got the following warning:
The struct MQTTSNLenStrings
len
member is an signed int but is compared tostrlen
ssize_t
return value.The
len
member is written only in https://github.com/eclipse/paho.mqtt-sn.embedded-c/blob/ad86a276b56253f39686bc0a5984b4ebf39fe36f/MQTTSNPacket/src/MQTTSNPacket.c#L214This would not work if
len
is unsized, but this could be changed to something likeRegards