1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-30 06:50:31 +02:00

Placate GCC in `test-ffi-lib.c'.

This fixes warnings saying "this decimal constant is unsigned only in
ISO C90".

* test-suite/standalone/test-ffi-lib.c (test_ffi_u32_, test_ffi_u32_u8,
  test_ffi_u32_s64, test_ffi_s64_s64, test_ffi_u64_u8,
  test_ffi_u64_s64): Mark constants as unsigned.
This commit is contained in:
Ludovic Courtès 2011-06-20 00:45:18 +02:00
parent 5f09e4ba3c
commit 134fe52a85

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2010 Free Software Foundation, Inc. /* Copyright (C) 2010, 2011 Free Software Foundation, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License * modify it under the terms of the GNU Lesser General Public License
@ -132,19 +132,19 @@ scm_t_int32 test_ffi_s32_s64 (scm_t_int64 a)
scm_t_uint32 test_ffi_u32_ (void); scm_t_uint32 test_ffi_u32_ (void);
scm_t_uint32 test_ffi_u32_ (void) scm_t_uint32 test_ffi_u32_ (void)
{ {
return 4000000000; return 4000000000U;
} }
scm_t_uint32 test_ffi_u32_u8 (scm_t_uint8 a); scm_t_uint32 test_ffi_u32_u8 (scm_t_uint8 a);
scm_t_uint32 test_ffi_u32_u8 (scm_t_uint8 a) scm_t_uint32 test_ffi_u32_u8 (scm_t_uint8 a)
{ {
return 4000000000 + a; return 4000000000U + a;
} }
scm_t_uint32 test_ffi_u32_s64 (scm_t_int64 a); scm_t_uint32 test_ffi_u32_s64 (scm_t_int64 a);
scm_t_uint32 test_ffi_u32_s64 (scm_t_int64 a) scm_t_uint32 test_ffi_u32_s64 (scm_t_int64 a)
{ {
return 4000000000 + a; return 4000000000U + a;
} }
/* FIXME: use 64-bit literals */ /* FIXME: use 64-bit literals */
@ -169,19 +169,19 @@ scm_t_int64 test_ffi_s64_s64 (scm_t_int64 a)
scm_t_uint64 test_ffi_u64_ (void); scm_t_uint64 test_ffi_u64_ (void);
scm_t_uint64 test_ffi_u64_ (void) scm_t_uint64 test_ffi_u64_ (void)
{ {
return 4000000000; return 4000000000UL;
} }
scm_t_uint64 test_ffi_u64_u8 (scm_t_uint8 a); scm_t_uint64 test_ffi_u64_u8 (scm_t_uint8 a);
scm_t_uint64 test_ffi_u64_u8 (scm_t_uint8 a) scm_t_uint64 test_ffi_u64_u8 (scm_t_uint8 a)
{ {
return 4000000000 + a; return 4000000000UL + a;
} }
scm_t_uint64 test_ffi_u64_s64 (scm_t_int64 a); scm_t_uint64 test_ffi_u64_s64 (scm_t_int64 a);
scm_t_uint64 test_ffi_u64_s64 (scm_t_int64 a) scm_t_uint64 test_ffi_u64_s64 (scm_t_int64 a)
{ {
return 4000000000 + a; return 4000000000UL + a;
} }