irrtoolset / irrtoolset

The Internet Routing Registry Toolset
Other
134 stars 33 forks source link

Warning message output when make is executed #58

Closed M-anazawa closed 4 years ago

M-anazawa commented 4 years ago

The following message is output when make is executed. Is there a way to improve it? Also, what is the effect of using it in this state?

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: prefix.cc: In member function ‘ipv6_addr_t MPPrefix::get_mask() const’: prefix.cc:921:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ prefix.cc: In member function ‘ipv6_addr_t MPPrefix::get_ipaddr() const’: prefix.cc:926:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ prefix.cc: In member function ‘ipv6_addr_t MPPrefix::get_range() const’: prefix.cc:931:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ prefix.cc: In function ‘ipv6_addr_t hex2ipv6(char, ipv6_addr_t)’: prefix.cc:497:16: warning: ‘char strncat(char, const char, size_t)’ specified bound depends on the length of the source argument [-Wstringop-overflow=] strncat (str, hex, strlen (hex) - strlen(dots) + 1);


prefix.cc:492:16: warning: ‘char* strncat(char*, const char*, size_t)’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
        strncat (str, hex, strlen (hex) - 2);
        ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
prefix.cc: In member function ‘void IPv6PrefixRange::parse(const char*)’:
prefix.cc:628:13: warning: ‘char* strncat(char*, const char*, size_t)’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
     strncat (address, name, strlen (name));
     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prefix.cc:576:13: warning: ‘char* strncat(char*, const char*, size_t)’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
     strncat (address, name, strlen (name) - strlen(slash));
     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prefix.cc:576:36: note: length computed here
     strncat (address, name, strlen (name) - strlen(slash));
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
M-anazawa commented 4 years ago

The OS uses CentOS8.

nickhilliard commented 4 years ago

these are harmless gcc compiler warnings. You can read more about them here:

https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html