From 4f1ef9d80a0607a37ef931241c14ed2da153094f Mon Sep 17 00:00:00 2001 From: kettenis <> Date: Tue, 14 Jul 2020 16:40:04 +0000 Subject: getopt(3) returns an int so don't use a char to store its return value. Makes the test work on architectures where char is unsigned. ok deraadt@, millert@ --- src/regress/lib/libc/printf/string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/regress/lib/libc/printf/string.c') diff --git a/src/regress/lib/libc/printf/string.c b/src/regress/lib/libc/printf/string.c index afbc4fc79c..6e65a371a4 100644 --- a/src/regress/lib/libc/printf/string.c +++ b/src/regress/lib/libc/printf/string.c @@ -1,4 +1,4 @@ -/* $OpenBSD: string.c,v 1.1 2020/07/08 01:18:04 schwarze Exp $ */ +/* $OpenBSD: string.c,v 1.2 2020/07/14 16:40:04 kettenis Exp $ */ /* * Copyright (c) 2020 Ingo Schwarze * @@ -255,7 +255,7 @@ main(int argc, char *argv[]) const wchar_t ws[] = { 0x0421, 0x043e, 0x0444, 0x044f, 0 }; const wchar_t wsbad[] = { 0x0391, 0xdeef, 0x3c9, 0 }; int badarg, picky; - char ch; + int ch; badarg = picky = 0; while ((ch = getopt(argc, argv, "pv")) != -1) { -- cgit v1.2.3-55-g6feb