Hello community,

here is the log from the commit of package cmocka for openSUSE:Factory checked 
in at 2013-07-12 20:42:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cmocka (Old)
 and      /work/SRC/openSUSE:Factory/.cmocka.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cmocka"

Changes:
--------
--- /work/SRC/openSUSE:Factory/cmocka/cmocka.changes    2013-06-05 
11:43:23.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.cmocka.new/cmocka.changes       2013-07-12 
20:42:33.000000000 +0200
@@ -1,0 +2,7 @@
+Wed Jul 10 13:38:42 UTC 2013 - a...@cryptomilk.org
+
+- Update to version 0.3.1
+  * Fixed pointer conversion on s390 and ppc (32bit big endian).
+  * Fixed the customer_database test on big endian.
+
+-------------------------------------------------------------------

Old:
----
  cmocka-0.3.0.tar.gz

New:
----
  cmocka-0.3.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cmocka.spec ++++++
--- /var/tmp/diff_new_pack.Y8zlkJ/_old  2013-07-12 20:42:34.000000000 +0200
+++ /var/tmp/diff_new_pack.Y8zlkJ/_new  2013-07-12 20:42:34.000000000 +0200
@@ -20,7 +20,7 @@
 BuildRequires:  glibc-devel
 
 Name:           cmocka
-Version:        0.3.0
+Version:        0.3.1
 Release:        0
 #
 Summary:        Lightweight library to simplify and generalize unit tests for C

++++++ cmocka-0.3.0.tar.gz -> cmocka-0.3.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cmocka-0.3.0/AUTHORS new/cmocka-0.3.1/AUTHORS
--- old/cmocka-0.3.0/AUTHORS    2012-06-14 12:58:52.000000000 +0200
+++ new/cmocka-0.3.1/AUTHORS    2013-06-05 12:07:21.000000000 +0200
@@ -1,2 +1,3 @@
 opensou...@google.com
-
+Andreas Schneider <a...@cryptomilk.org>
+Jakub Hrozek <jhro...@redhat.com>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cmocka-0.3.0/CMakeLists.txt 
new/cmocka-0.3.1/CMakeLists.txt
--- old/cmocka-0.3.0/CMakeLists.txt     2013-06-04 13:46:13.000000000 +0200
+++ new/cmocka-0.3.1/CMakeLists.txt     2013-07-10 15:26:47.000000000 +0200
@@ -8,7 +8,7 @@
 
 set(APPLICATION_VERSION_MAJOR "0")
 set(APPLICATION_VERSION_MINOR "3")
-set(APPLICATION_VERSION_PATCH "0")
+set(APPLICATION_VERSION_PATCH "1")
 
 set(APPLICATION_VERSION 
"${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}")
 
@@ -19,7 +19,7 @@
 #     Increment AGE. Set REVISION to 0
 #   If the source code was changed, but there were no interface changes:
 #     Increment REVISION.
-set(LIBRARY_VERSION "0.1.0")
+set(LIBRARY_VERSION "0.1.1")
 set(LIBRARY_SOVERSION "0")
 
 # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is 
checked
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cmocka-0.3.0/CPackConfig.cmake 
new/cmocka-0.3.1/CPackConfig.cmake
--- old/cmocka-0.3.0/CPackConfig.cmake  2013-06-05 08:29:19.000000000 +0200
+++ new/cmocka-0.3.1/CPackConfig.cmake  2013-07-10 15:27:16.000000000 +0200
@@ -11,9 +11,9 @@
 
 
 ### versions
-set(CPACK_PACKAGE_VERSION_MAJOR "0")
-set(CPACK_PACKAGE_VERSION_MINOR "3")
-set(CPACK_PACKAGE_VERSION_PATCH "0")
+set(CPACK_PACKAGE_VERSION_MAJOR "${APPLICATION_VERSION_MAJOR}")
+set(CPACK_PACKAGE_VERSION_MINOR "${APPLICATION_VERSION_MINOR}")
+set(CPACK_PACKAGE_VERSION_PATCH "${APPLICATION_VERSION_PATCH}")
 set(CPACK_PACKAGE_VERSION 
"${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cmocka-0.3.0/ChangeLog new/cmocka-0.3.1/ChangeLog
--- old/cmocka-0.3.0/ChangeLog  2013-06-05 08:16:12.000000000 +0200
+++ new/cmocka-0.3.1/ChangeLog  2013-07-10 15:26:19.000000000 +0200
@@ -1,3 +1,8 @@
+Wed Jul 10 15:24 2013 Andreas Schneider <a...@cryptomilk.org>
+    * cmocka: version 0.3.1
+    * Fixed pointer conversion on s390 and ppc (32bit big endian).
+    * Fixed the customer_database test on big endian.
+
 Wed Jun 05 08:14 2013 Andreas Schneider <a...@cryptomilk.org>
     * cmocka: version 0.3.0
     * Added a better mock object example.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cmocka-0.3.0/ConfigureChecks.cmake 
new/cmocka-0.3.1/ConfigureChecks.cmake
--- old/cmocka-0.3.0/ConfigureChecks.cmake      2012-10-15 19:45:44.000000000 
+0200
+++ new/cmocka-0.3.1/ConfigureChecks.cmake      2013-07-10 15:16:00.000000000 
+0200
@@ -94,5 +94,6 @@
 
 # ENDIAN
 if (NOT WIN32)
+    set(WORDS_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P})
     test_big_endian(WORDS_BIGENDIAN)
 endif (NOT WIN32)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cmocka-0.3.0/config.h.cmake 
new/cmocka-0.3.1/config.h.cmake
--- old/cmocka-0.3.0/config.h.cmake     2012-06-14 12:58:52.000000000 +0200
+++ new/cmocka-0.3.1/config.h.cmake     2013-07-10 15:16:04.000000000 +0200
@@ -131,6 +131,8 @@
 
 /*************************** ENDIAN *****************************/
 
+#cmakedefine WORDS_SIZEOF_VOID_P ${WORDS_SIZEOF_VOID_P}
+
 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
    significant byte first (like Motorola and SPARC, unlike Intel). */
 #cmakedefine WORDS_BIGENDIAN 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cmocka-0.3.0/example/chef_wrap/waiter_test_wrap.c 
new/cmocka-0.3.1/example/chef_wrap/waiter_test_wrap.c
--- old/cmocka-0.3.0/example/chef_wrap/waiter_test_wrap.c       2013-06-04 
10:09:24.000000000 +0200
+++ new/cmocka-0.3.1/example/chef_wrap/waiter_test_wrap.c       2013-06-11 
09:53:57.000000000 +0200
@@ -18,6 +18,7 @@
 #include <errno.h>
 #include <stdbool.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
 #include <stdarg.h>
@@ -61,21 +62,21 @@
 
     check_expected(order);
 
-    knows_dish = (bool) mock();
+    knows_dish = mock_type(bool);
     if (knows_dish == false) {
         return -1;
     }
 
-    has_ingredients = (bool) mock();
+    has_ingredients = mock_type(bool);
     if (has_ingredients == false) {
         return -2;
     }
 
-    dish = (char *) mock();
+    dish = mock_ptr_type(char *);
     *dish_out = strdup(dish);
     if (*dish_out == NULL) return ENOMEM;
 
-    return mock();
+    return mock_type(int);
 }
 
 /* Waiter return codes:
@@ -96,6 +97,7 @@
 
     /* Check if we received the dish we wanted from the kitchen */
     if (strcmp(order, *dish) != 0) {
+        free(*dish);
         *dish = NULL;
         return -2;
     }
@@ -128,6 +130,9 @@
     assert_int_equal(rv, 0);
     /* And actually receive one */
     assert_string_equal(dish, "hotdog");
+    if (dish != NULL) {
+        free(dish);
+    }
 }
 
 static void test_bad_dish(void **state)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cmocka-0.3.0/example/customer_database.c 
new/cmocka-0.3.1/example/customer_database.c
--- old/cmocka-0.3.0/example/customer_database.c        2012-10-20 
01:01:17.000000000 +0200
+++ new/cmocka-0.3.1/example/customer_database.c        2013-07-10 
12:34:30.000000000 +0200
@@ -42,8 +42,10 @@
              "SELECT ID FROM CUSTOMERS WHERE NAME = %s", customer_name);
     number_of_results = connection->query_database(connection, query_string,
                                                    &results);
+
     if (number_of_results != 1) {
         return -1;
     }
-    return (unsigned int)(size_t) results[0];
+
+    return (unsigned int)*((int *)results);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cmocka-0.3.0/example/customer_database_test.c 
new/cmocka-0.3.1/example/customer_database_test.c
--- old/cmocka-0.3.0/example/customer_database_test.c   2012-10-12 
22:57:01.000000000 +0200
+++ new/cmocka-0.3.1/example/customer_database_test.c   2013-07-10 
12:34:31.000000000 +0200
@@ -30,8 +30,8 @@
     (void) connection; /* unused */
     (void) query_string; /* unused */
 
-    *results = (void**)((size_t)mock());
-    return (unsigned int)mock();
+    *results = (void **)mock_ptr_type(int *);
+    return mock_ptr_type(int);
 }
 
 /* Mock of the connect to database function. */
@@ -68,12 +68,15 @@
     };
     /* Return a single customer ID when mock_query_database() is called. */
     int customer_ids = 543;
+    int rc;
 
     (void) state; /* unused */
 
     will_return(mock_query_database, &customer_ids);
     will_return(mock_query_database, 1);
-    assert_int_equal(get_customer_id_by_name(&connection, "john doe"), 543);
+
+    rc = get_customer_id_by_name(&connection, "john doe");
+    assert_int_equal(rc, 543);
 }
 
 int main(void) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cmocka-0.3.0/src/cmocka.c 
new/cmocka-0.3.1/src/cmocka.c
--- old/cmocka-0.3.0/src/cmocka.c       2012-10-20 00:49:39.000000000 +0200
+++ new/cmocka-0.3.1/src/cmocka.c       2013-07-10 15:21:23.000000000 +0200
@@ -78,7 +78,7 @@
 #define declare_initialize_value_pointer_pointer(name, ptr) \
     ValuePointer name ; \
     name.value = 0; \
-    name.pointer = (void*)(ptr)
+    name.x.pointer = (void*)(ptr)
 
 /*
  * Declare and initialize the value member of ValuePointer variable name
@@ -91,12 +91,17 @@
 /* Cast a LargestIntegralType to pointer_type via a ValuePointer. */
 #define cast_largest_integral_type_to_pointer( \
     pointer_type, largest_integral_type) \
-    ((pointer_type)((ValuePointer*)&(largest_integral_type))->pointer)
+    ((pointer_type)((ValuePointer*)&(largest_integral_type))->x.pointer)
 
 /* Used to cast LargetIntegralType to void* and vice versa. */
 typedef union ValuePointer {
     LargestIntegralType value;
-    void *pointer;
+    struct {
+#if defined(WORDS_BIGENDIAN) && (WORDS_SIZEOF_VOID_P == 4)
+        unsigned int padding;
+#endif
+        void *pointer;
+    } x;
 } ValuePointer;
 
 /* Doubly linked list node. */

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to