[PATCH 1/2] tests: Additional IPC checks

Dmitry V. Levin ldv at altlinux.org
Thu Sep 8 10:47:10 UTC 2016


On Wed, Sep 07, 2016 at 03:41:01PM +0300, Eugene Syromyatnikov wrote:
[...]
> diff --git a/tests/ipc_shm.c b/tests/ipc_shm.c
> index 80a8f0f..c2c1b26 100644
> --- a/tests/ipc_shm.c
> +++ b/tests/ipc_shm.c
> @@ -49,8 +49,11 @@ cleanup(void)
>  int
>  main(void)
>  {
> -	static const key_t bogus_key = (key_t)0xeca86420fdb97531LLU;
> -	static const size_t bogus_size = 0xdec0ded1dec0ded2LLU;
> +	static const key_t bogus_key = (key_t)0xeca86420fdb97531ULL;
> +	static const int bogus_id = 0xdefaced1;
> +	static const int bogus_cmd = 0xdefaced2;
> +	static void * const bogus_addr = (void *) -1L;
> +	static const size_t bogus_size = 0xdec0ded1dec0ded2ULL;

tests/ipc_shm.c: In function 'main':
tests/ipc_shm.c:56:35: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
  static const size_t bogus_size = 0xdec0ded1dec0ded2ULL;
                                   ^

-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20160908/614cc325/attachment.bin>


More information about the Strace-devel mailing list