NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PR/59314 CVS commit: src/tests/kernel



The following reply was made to PR kern/59314; it has been noted by GNATS.

From: "Taylor R Campbell" <riastradh%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/59314 CVS commit: src/tests/kernel
Date: Sat, 19 Apr 2025 01:56:50 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Sat Apr 19 01:56:50 UTC 2025
 
 Modified Files:
 	src/tests/kernel: t_memfd_create.c
 
 Log Message:
 t_memfd_create: Cast size_t to off_t, not vice versa.
 
 off_t is always 64-bit; size_t may be 32- or 64-bit depending on the
 architecture and ABI, so casting off_t to size_t may truncate.
 
 Should better resolve this build failure (not sure how I missed it,
 definitely compile-tested at least this file on two different
 architectures, one of which was evbmips64-eb and the other I have
 forgotten):
 
 /tmp/build/2025.04.18.20.51.31-sparc64/src/tests/kernel/t_memfd_create.c:129:9: error: comparison of integer expressions of different signedness: '__off_t' {aka 'long int'} and 'size_t' {aka 'long unsigned int'} [-Werror=sign-compare]
   129 |         ATF_REQUIRE_EQ_MSG(offset, rwbuf_size,
       |         ^~~~~~~~~~~~~~~~~~
 
 PR kern/59314: t_memfd_create:seal_grow is failing
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.6 -r1.7 src/tests/kernel/t_memfd_create.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 


Home | Main Index | Thread Index | Old Index