Commit 0e624da7 authored by Josh Kunz's avatar Josh Kunz

Fix two additional warnings

parent 33d60ba5
Pipeline #1938 passed with stage
......@@ -1384,7 +1384,7 @@ char *cn_annotation_string(cn_annotation_t *a) {
: cn_objtype_name(a->declassifier->type),
(a->declassifier == OBJ_SYSTEM_DECLASSIFIER)
? -1
: a->declassifier->type,
: (int) a->declassifier->type,
a->method_mask,
a->data.val, a->data.copy_f, a->data.free_f);
}
......
......@@ -796,7 +796,14 @@ STATIC_ASSERT(sizeof(cptr_t) == sizeof(gpointer),
#define cptr2gptr(cptr_) ((gpointer) (cptr_.cptr))
#define cptr2gptr2(cptr_) ((gpointer *) &(cptr_.cptr))
#define gptr2cptr(gptr) (*((cptr_t *) &(gptr)))
/* need to do an explicity copy since gpointers are not compatible with
* cptr_t structs, and therefore a naieve dereference violates strict-aliasing. */
static inline cptr_t gptr2cptr(gpointer gptr) {
cptr_t res;
memcpy(&res, &gptr, sizeof(res));
return res;
}
STATIC_ASSERT(sizeof(cptr_t) == sizeof(unsigned long),
size_of_cptr_and_unsigned_long_must_be_same);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment