Browse Source

typesafe_cb: 64 bit fixes.

In particular, gcc warns about cast from int to pointer.
Rusty Russell 15 years ago
parent
commit
3b9d55bd9c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      ccan/typesafe_cb/test/compile_fail-cast_if_type-promotable.c

+ 2 - 2
ccan/typesafe_cb/test/compile_fail-cast_if_type-promotable.c

@@ -6,7 +6,7 @@ static void _set_some_value(void *val)
 }
 
 #define set_some_value(expr)						\
-	_set_some_value(cast_if_type(void *, (expr), (expr), int))
+	_set_some_value(cast_if_type(void *, (expr), (expr), long))
 
 int main(int argc, char *argv[])
 {
@@ -16,7 +16,7 @@ int main(int argc, char *argv[])
 #error "Unfortunately we don't fail if cast_if_type is a noop."
 #endif
 #else
-	int x = 0;
+	long x = 0;
 #endif
 	set_some_value(x);
 	return 0;