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
Thanks for this. This is due to the change of notify scripts in v1.3.0
being changed from a simple char * to a notify_script_t. I didn't think
to enable SNMP when making the changes.
I'll submit a patch in the next hour or so.
Quentin
------------------------------------------------------------------------------
_______________________________________________
Keepalived-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/keepalived-devel