Actions
Bug #372
closedstring data in port generates an annoying compilation warning
Description
This bug.gen module:
component bug {
struct foo {
string bar;
};
port out foo Bug;
task bla {
period 100 ms;
codel <start> InitBla(port out Bug) yield ether;
};
};
generates the warning below:
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./autoconf -I/home/felix/openrobots/include -I/home/felix/openrobots/include -pthread -g -O2 -MT src/libbug_c_client_la-bug_portlib.lo -MD -MP -MF src/.deps/libbug_c_client_la-bug_portlib.Tpo -c src/bug_portlib.c -fPIC -DPIC -o src/.libs/libbug_c_client_la-bug_portlib.o In file included from src/bug_portlib.c:9: In function ‘genom_deserialize_string’, inlined from ‘genom_deserialize_t_bug_foo’ at src/serialize.h:857:7, inlined from ‘genom_bug_Bug_decode’ at src/bug_portlib.c:59:7: src/serialize.h:814:24: warning: ‘strnlen’ specified bound 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=] 814 | size_t l = (*size) ? strnlen(*buffer, *size) : strlen(*buffer); | ^~~~~~~~~~~~~~~~~~~~~~~
Nothing dramatic, just annoying in the middle of a warning less compilation ;-)
Actions