aliasing
authorAnas Nashif <anas.nashif@intel.com>
Fri, 22 Feb 2013 15:42:24 +0000 (07:42 -0800)
committerAnas Nashif <anas.nashif@intel.com>
Fri, 22 Feb 2013 15:42:24 +0000 (07:42 -0800)
libedsio/edsiotest.c
xdelta.c

index 1d30dc0..ee218c1 100755 (executable)
@@ -48,6 +48,7 @@ test2 ()
   const char* str = "hello there";
   const char* str2;
   guint32 str2_len;
+  const char ** str2_ptr = &str2;
 
   PropTest *pt = g_new0 (PropTest, 1);
 
@@ -63,12 +64,12 @@ test2 ()
 
   g_assert (proptest_isset_bytes (pt, prop));
 
-  g_assert (proptest_get_bytes (pt, prop, (const guint8**) & str2, & str2_len) && str2_len == (strlen (str) + 1) && strcmp (str, str2) == 0);
+  g_assert (proptest_get_bytes (pt, prop, (const guint8**) str2_ptr, & str2_len) && str2_len == (strlen (str) + 1) && strcmp (str, str2) == 0);
 
   /* kill the cache, to test persistence. */
   pt->_edsio_property_table = NULL;
 
-  g_assert (proptest_get_bytes (pt, prop, (const guint8**) & str2, & str2_len) && str2_len == (strlen (str) + 1) && strcmp (str, str2) == 0);
+  g_assert (proptest_get_bytes (pt, prop, (const guint8**) str2_ptr, & str2_len) && str2_len == (strlen (str) + 1) && strcmp (str, str2) == 0);
 
   g_assert (proptest_unset_bytes (pt, prop));
 
index 656038a..d2696a1 100755 (executable)
--- a/xdelta.c
+++ b/xdelta.c
@@ -1414,6 +1414,7 @@ xdp_control_read (XdeltaStream    *cont_in)
 {
   SerialSource* src = handle_source (cont_in);
   XdeltaControl* cont;
+  XdeltaControl** cont_ptr = &cont;
   SerialType type;
 
   if (! src)
@@ -1421,7 +1422,7 @@ xdp_control_read (XdeltaStream    *cont_in)
 
   /* TODO: free src */
 
-  if (! serializeio_unserialize_generic_acceptable (src, ST_XdeltaControl | ST_Version0Control, & type, (void**) & cont))
+  if (! serializeio_unserialize_generic_acceptable (src, ST_XdeltaControl | ST_Version0Control, & type, (void **) cont_ptr))
     return NULL;
 
   if (type == ST_Version0Control)