On Fri, Nov 20, 2015 at 04:56:44PM +0100, Sumit Bose wrote:
On Fri, Nov 20, 2015 at 04:34:46PM +0100, Pavel Reichl wrote:
> Hello,
>
> trivial attached patch fixes following warning:
>
> ../src/tests/sysdb-tests.c: In function ‘test_sysdb_attrs_add_lc_name_alias’:
> ../src/tests/sysdb-tests.c:4716:72: error: passing argument 4 of
‘sysdb_attrs_get_string_array’ from incompatible pointer type
[-Werror=incompatible-pointer-types]
> ret = sysdb_attrs_get_string_array(attrs, SYSDB_NAME_ALIAS, attrs, &list);
> ^
> In file included from ../src/db/sysdb_private.h:87:0,
> from ../src/tests/sysdb-tests.c:32:
> ../src/db/sysdb.h:347:5: note: expected ‘const char ***’ but argument is of type
‘char ***’
> int sysdb_attrs_get_string_array(struct sysdb_attrs *attrs, const char *name,
> ^
> ../src/tests/sysdb-tests.c: In function ‘test_sysdb_attrs_add_lc_name_alias_safe’:
> ../src/tests/sysdb-tests.c:4759:72: error: passing argument 4 of
‘sysdb_attrs_get_string_array’ from incompatible pointer type
[-Werror=incompatible-pointer-types]
> ret = sysdb_attrs_get_string_array(attrs, SYSDB_NAME_ALIAS, attrs, &list);
> ^
> In file included from ../src/db/sysdb_private.h:87:0,
> from ../src/tests/sysdb-tests.c:32:
> ../src/db/sysdb.h:347:5: note: expected ‘const char ***’ but argument is of type
‘char ***’
> int sysdb_attrs_get_string_array(struct sysdb_attrs *attrs, const char *name,
> ^
> ../src/tests/sysdb-tests.c:4773:72: error: passing argument 4 of
‘sysdb_attrs_get_string_array’ from incompatible pointer type
[-Werror=incompatible-pointer-types]
> ret = sysdb_attrs_get_string_array(attrs, SYSDB_NAME_ALIAS, attrs, &list);
> ^
> In file included from ../src/db/sysdb_private.h:87:0,
> from ../src/tests/sysdb-tests.c:32:
> ../src/db/sysdb.h:347:5: note: expected ‘const char ***’ but argument is of type
‘char ***’
> int sysdb_attrs_get_string_array(struct sysdb_attrs *attrs, const char *name,
>
> Thanks!
obvious ACK (CI is still running).
CI passed (RHEL6 issue is unrelated)
http://sssd-ci.duckdns.org/logs/job/33/72/summary.html
bye,
Sumit
>
> Nevertheless I wonder why it is declared const in
> sysdb_attrs_get_string_array() because it isn't. Maybe there was an
> older version which referenced the elements in the attrs struct directly
> but currently the result is completely talloc'ed.
>
> bye,
> Sumit
> _______________________________________________
> sssd-devel mailing list
> sssd-devel(a)lists.fedorahosted.org
>
https://lists.fedorahosted.org/admin/lists/sssd-devel@lists.fedorahosted.org