Module Name: src
Committed By: rillig
Date: Wed Dec 30 11:47:16 UTC 2020
Modified Files:
src/usr.bin/xlint/common: emit.c
Log Message:
lint: fix Clang-tidy warning about narrowing conversion
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/xlint/common/emit.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/xlint/common/emit.c
diff -u src/usr.bin/xlint/common/emit.c:1.8 src/usr.bin/xlint/common/emit.c:1.9
--- src/usr.bin/xlint/common/emit.c:1.8 Wed Dec 30 10:46:11 2020
+++ src/usr.bin/xlint/common/emit.c Wed Dec 30 11:47:15 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: emit.c,v 1.8 2020/12/30 10:46:11 rillig Exp $ */
+/* $NetBSD: emit.c,v 1.9 2020/12/30 11:47:15 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: emit.c,v 1.8 2020/12/30 10:46:11 rillig Exp $");
+__RCSID("$NetBSD: emit.c,v 1.9 2020/12/30 11:47:15 rillig Exp $");
#endif
#include <ctype.h>
@@ -133,7 +133,7 @@ outchar(int c)
}
/*
- * write a character to the output buffer, qouted if necessary
+ * write a character to the output buffer, quoted if necessary
*/
void
outqchar(int c)
@@ -175,8 +175,8 @@ outqchar(int c)
outchar('a');
break;
default:
- outchar((((u_int)c >> 6) & 07) + '0');
- outchar((((u_int)c >> 3) & 07) + '0');
+ outchar((((unsigned char)c >> 6) & 07) + '0');
+ outchar((((unsigned char)c >> 3) & 07) + '0');
outchar((c & 07) + '0');
break;
}