Re: Compiler warnings with 1.3.1

Quentin Armitage <[email protected]>
Newsgroups gmane.linux.keepalived.devel
Organization The Armitage family
Message-ID <[email protected]>
On Mon, 2016-11-21 at 12:31 -0600, Ryan O'Hara wrote:

> Just a heads-up that there are several compiler warnings when building
> 1.3.1. It appears there are some funky strlen calls in
> check_snmp.c. For example:
> 
> check_snmp.c: In function 'check_snmp_virtualserver':
> check_snmp.c:523:21: warning: passing argument 1 of 'strlen' from
> incompatible pointer type [-Wincompatible-pointer-types]
>    *var_len = strlen(v->quorum_up);
>                      ^
> In file included from ./../include/check_data.h:28:0,
>                  from check_snmp.c:25:
> /usr/include/string.h:394:15: note: expected 'const char *' but
> argument is of type 'notify_script_t * {aka struct _notify_script *}'
>  extern size_t strlen (const char *__s)
>                ^~~~~~
> 
> I've not yet had time to figure out exactly what the intent here is,
> but strlen of a notify_script_t struct is the problem. Does this need
> to be a sizeof? My guess is the code here is supposed to determine the
> size of the SNMP data, but I am not all that familiar with the SNMP
> code.
> 
> Ryan

Commit f27bc56 resolves this issue.

With many apologies for any problems caused, and thanks to Ryan for
reporting this.

Quentin

------------------------------------------------------------------------------

_______________________________________________
Keepalived-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/keepalived-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.