On 11/20/2015 12:48 PM, Lukas Slebodnik wrote:
On (12/11/15 10:01), Lukas Slebodnik wrote:
>ehlo,
>
>you can see warnings on 32 bit machine and cmocka tests.
>
>So the simplest reproducer is to use mock
>mock --root fedora-21-i386 --resultdir . --rebuild 
./sssd-1.13.90-0.fc23.src.rpm
>
>I plan to send patch for cmocka. Therefore there is #ifndef will_return_ptr.
>I would like to avoid prefixed version with sss_ because
>it might be useful for other cmocka user as well.
>
I decided to also provide will_return_always_ptr
to avoid ising cast* for will_return_always

Updated patch is attached.

LS



--- a/src/tests/cmocka/test_sdap.c
+++ b/src/tests/cmocka/test_sdap.c
@@ -53,7 +53,8 @@ static struct mock_ldap_entry *mock_ldap_entry_get(void)

  void set_entry_parse(struct mock_ldap_entry *entry)
  {
-    will_return_always(mock_ldap_entry_get, entry);
+    will_return_always(mock_ldap_entry_get,
+                       cast_ptr_to_largest_integral_type(entry));
  }

  LDAPDerefRes *mock_deref_res(TALLOC_CTX *mem_ctx,

Could you use will_return_always_ptr in the part above?

Michal
_______________________________________________
sssd-devel mailing list
[email protected]
https://lists.fedorahosted.org/admin/lists/[email protected]

Reply via email to