Skip to content

Commit 109e8b4

Browse files
bors[bot]asomers
andauthored
Merge #1217 #1218
1217: Remove a few more cases of mem::uninitialized in the tests r=asomers a=asomers Somehow I didn't noticed these in PR #1158, probably because they're only built on Linux. 1218: Update the FreeBSD CI image to 11.3. r=asomers a=asomers 11.2 is EOL. Co-authored-by: Alan Somers <[email protected]>
3 parents f94e882 + 7974dcc + 4a83991 commit 109e8b4

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.cirrus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
freebsd_instance:
2-
image: freebsd-11-2-release-amd64
2+
image_family: freebsd-11-3-snap
33

44
# Test FreeBSD in a full VM on cirrus-ci.com. Test the i686 target too, in the
55
# same VM. The binary will be built in 32-bit mode, but will execute on a
66
# 64-bit kernel and in a 64-bit environment. Our tests don't execute any of
77
# the system's binaries, so the environment shouldn't matter.
88
task:
9-
name: FreeBSD 11.2
9+
name: FreeBSD 11.3
1010
cargo_cache:
1111
folder: $CARGO_HOME/registry
1212
fingerprint_script: cat Cargo.lock || echo ""

bors.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Gate on Travis CI and Buildbot
22
status = ["continuous-integration/travis-ci/push",
3-
"FreeBSD 11.2"]
3+
"FreeBSD 11.3"]
44

55
# Set bors's timeout to 4 hours
66
#

test/sys/test_ioctl.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ mod linux_ioctls {
182182
#[test]
183183
fn test_ioctl_read_bad() {
184184
let file = tempfile().unwrap();
185-
let mut termios = unsafe { mem::uninitialized() };
185+
let mut termios = unsafe { mem::zeroed() };
186186
let res = unsafe { tcgets(file.as_raw_fd(), &mut termios) };
187187
assert_eq!(res, Err(Sys(ENOTTY)));
188188
}
@@ -199,7 +199,7 @@ mod linux_ioctls {
199199
#[test]
200200
fn test_ioctl_write_ptr_bad() {
201201
let file = tempfile().unwrap();
202-
let termios: termios = unsafe { mem::uninitialized() };
202+
let termios: termios = unsafe { mem::zeroed() };
203203
let res = unsafe { tcsets(file.as_raw_fd(), &termios) };
204204
assert_eq!(res, Err(Sys(ENOTTY)));
205205
}
@@ -250,7 +250,7 @@ mod linux_ioctls {
250250
#[test]
251251
fn test_ioctl_read() {
252252
let file = tempfile().unwrap();
253-
let mut data: v4l2_audio = unsafe { mem::uninitialized() };
253+
let mut data: v4l2_audio = unsafe { mem::zeroed() };
254254
let res = unsafe { g_audio(file.as_raw_fd(), &mut data) };
255255
assert!(res == Err(Sys(ENOTTY)) || res == Err(Sys(ENOSYS)));
256256
}
@@ -260,7 +260,7 @@ mod linux_ioctls {
260260
#[test]
261261
fn test_ioctl_readwrite() {
262262
let file = tempfile().unwrap();
263-
let mut data: v4l2_audio = unsafe { mem::uninitialized() };
263+
let mut data: v4l2_audio = unsafe { mem::zeroed() };
264264
let res = unsafe { enum_audio(file.as_raw_fd(), &mut data) };
265265
assert!(res == Err(Sys(ENOTTY)) || res == Err(Sys(ENOSYS)));
266266
}

0 commit comments

Comments
 (0)