Browse code

- warning fixes (force casts)

Andrei Pelinescu-Onciul authored on 05/06/2007 16:35:27
Showing 1 changed files
... ...
@@ -38,10 +38,10 @@ typedef struct{ volatile int val; } atomic_t;
38 38
  * to implement mutexes you must use the mb_* versions or explicitely use
39 39
  * the barriers */
40 40
 
41
-#define atomic_set_int(pvar, i) (*(pvar)=i)
42
-#define atomic_set_long(pvar, i) (*(pvar)=i)
43
-#define atomic_get_int(pvar) (*(pvar))
44
-#define atomic_get_long(pvar) (*(pvar))
41
+#define atomic_set_int(pvar, i) (*(int*)(pvar)=i)
42
+#define atomic_set_long(pvar, i) (*(long*)(pvar)=i)
43
+#define atomic_get_int(pvar) (*(int*)(pvar))
44
+#define atomic_get_long(pvar) (*(long*)(pvar))
45 45
 
46 46
 #define atomic_set(at_var, value)	(atomic_set_int(&((at_var)->val), (value)))
47 47