summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2006-04-27 20:55:08 +0000
committerotto <otto@openbsd.org>2006-04-27 20:55:08 +0000
commit723375ce313896611973d7eb19492a83c64aba6c (patch)
treec6bba743bb19f88e2a1cb687c49a647def4dcea1
parentprint a quad as %lld, not %d (diff)
downloadwireguard-openbsd-723375ce313896611973d7eb19492a83c64aba6c.tar.xz
wireguard-openbsd-723375ce313896611973d7eb19492a83c64aba6c.zip
Make test use explicit signed char, instead of just char. We'll make
unspecified char tests later, when lint is smarter about char that. Discussed with cloder@
-rw-r--r--regress/usr.bin/xlint/test-19.c6
-rw-r--r--regress/usr.bin/xlint/test-19.c.exp48
2 files changed, 33 insertions, 21 deletions
diff --git a/regress/usr.bin/xlint/test-19.c b/regress/usr.bin/xlint/test-19.c
index 5ffee2a53f8..e2a39d06f9b 100644
--- a/regress/usr.bin/xlint/test-19.c
+++ b/regress/usr.bin/xlint/test-19.c
@@ -1,4 +1,4 @@
- /* $OpenBSD: test-19.c,v 1.2 2006/04/26 16:16:43 cloder Exp $ */
+ /* $OpenBSD: test-19.c,v 1.3 2006/04/27 20:55:08 otto Exp $ */
/*
* Placed in the public domain by Chad Loder <cloder@openbsd.org>.
@@ -7,7 +7,7 @@
*/
#include <limits.h>
-void c1 (char c){ c++; }
+void c1 (signed char c){ c++; }
void uc1 (unsigned char uc) { uc++; }
void s1 (short s) { s++; }
void us1 (unsigned short us) { us++; }
@@ -25,7 +25,7 @@ void ld1 (long double ld) { ld++; }
int
main(int argc, char* argv[])
{
- char C = 1;
+ signed char C = 1;
unsigned char UC = 1;
short S = 1;
unsigned short US = 1;
diff --git a/regress/usr.bin/xlint/test-19.c.exp b/regress/usr.bin/xlint/test-19.c.exp
index a75dc00d885..a32267ac001 100644
--- a/regress/usr.bin/xlint/test-19.c.exp
+++ b/regress/usr.bin/xlint/test-19.c.exp
@@ -1,13 +1,25 @@
-test-19.c:44: warning: c1() arg #1: converted from 'unsigned char' to 'char'
-test-19.c:45: warning: c1() arg #1: converted from 'short' to 'char'
-test-19.c:46: warning: c1() arg #1: converted from 'unsigned short' to 'char'
-test-19.c:47: warning: c1() arg #1: converted from 'int' to 'char'
-test-19.c:48: warning: c1() arg #1: converted from 'unsigned int' to 'char'
-test-19.c:49: warning: c1() arg #1: converted from 'long' to 'char'
-test-19.c:50: warning: c1() arg #1: converted from 'unsigned long' to 'char'
-test-19.c:51: warning: c1() arg #1: converted from 'long long' to 'char'
-test-19.c:52: warning: c1() arg #1: converted from 'unsigned long long' to 'char'
-test-19.c:57: warning: uc1() arg #1: converted from 'char' to 'unsigned char'
+test-19.c:44: warning: c1() arg #1: converted from 'unsigned char' to 'signed char'
+test-19.c:44: warning: c1() arg #1: converted from 'unsigned char' to 'signed char'
+test-19.c:45: warning: c1() arg #1: converted from 'short' to 'signed char'
+test-19.c:45: warning: c1() arg #1: converted from 'short' to 'signed char'
+test-19.c:46: warning: c1() arg #1: converted from 'unsigned short' to 'signed char'
+test-19.c:46: warning: c1() arg #1: converted from 'unsigned short' to 'signed char'
+test-19.c:47: warning: c1() arg #1: converted from 'int' to 'signed char'
+test-19.c:47: warning: c1() arg #1: converted from 'int' to 'signed char'
+test-19.c:48: warning: c1() arg #1: converted from 'unsigned int' to 'signed char'
+test-19.c:48: warning: c1() arg #1: converted from 'unsigned int' to 'signed char'
+test-19.c:49: warning: c1() arg #1: converted from 'long' to 'signed char'
+test-19.c:49: warning: c1() arg #1: converted from 'long' to 'signed char'
+test-19.c:50: warning: c1() arg #1: converted from 'unsigned long' to 'signed char'
+test-19.c:50: warning: c1() arg #1: converted from 'unsigned long' to 'signed char'
+test-19.c:51: warning: c1() arg #1: converted from 'long long' to 'signed char'
+test-19.c:51: warning: c1() arg #1: converted from 'long long' to 'signed char'
+test-19.c:52: warning: c1() arg #1: converted from 'unsigned long long' to 'signed char'
+test-19.c:52: warning: c1() arg #1: converted from 'unsigned long long' to 'signed char'
+test-19.c:53: warning: c1() arg #1: converted from 'float' to 'signed char'
+test-19.c:54: warning: c1() arg #1: converted from 'double' to 'signed char'
+test-19.c:55: warning: c1() arg #1: converted from 'long double' to 'signed char'
+test-19.c:57: warning: uc1() arg #1: converted from 'signed char' to 'unsigned char'
test-19.c:59: warning: uc1() arg #1: converted from 'short' to 'unsigned char'
test-19.c:60: warning: uc1() arg #1: converted from 'unsigned short' to 'unsigned char'
test-19.c:61: warning: uc1() arg #1: converted from 'int' to 'unsigned char'
@@ -43,7 +55,7 @@ test-19.c:108: warning: i1() arg #1: converted from 'unsigned long long' to 'int
test-19.c:109: warning: i1() arg #1: converted from 'float' to 'int'
test-19.c:110: warning: i1() arg #1: converted from 'double' to 'int'
test-19.c:111: warning: i1() arg #1: converted from 'long double' to 'int'
-test-19.c:113: warning: ui1() arg #1: converted from 'char' to 'unsigned int'
+test-19.c:113: warning: ui1() arg #1: converted from 'signed char' to 'unsigned int'
test-19.c:114: warning: ui1() arg #1: converted from 'unsigned char' to 'unsigned int'
test-19.c:115: warning: ui1() arg #1: converted from 'short' to 'unsigned int'
test-19.c:116: warning: ui1() arg #1: converted from 'unsigned short' to 'unsigned int'
@@ -60,7 +72,7 @@ test-19.c:122: warning: ui1() arg #1: converted from 'unsigned long long' to 'un
test-19.c:123: warning: ui1() arg #1: converted from 'float' to 'unsigned int'
test-19.c:124: warning: ui1() arg #1: converted from 'double' to 'unsigned int'
test-19.c:125: warning: ui1() arg #1: converted from 'long double' to 'unsigned int'
-test-19.c:127: warning: f1() arg #1: converted from 'char' to 'float'
+test-19.c:127: warning: f1() arg #1: converted from 'signed char' to 'float'
test-19.c:128: warning: f1() arg #1: converted from 'unsigned char' to 'float'
test-19.c:129: warning: f1() arg #1: converted from 'short' to 'float'
test-19.c:130: warning: f1() arg #1: converted from 'unsigned short' to 'float'
@@ -72,7 +84,7 @@ test-19.c:135: warning: f1() arg #1: converted from 'long long' to 'float'
test-19.c:136: warning: f1() arg #1: converted from 'unsigned long long' to 'float'
test-19.c:138: warning: f1() arg #1: converted from 'double' to 'float'
test-19.c:139: warning: f1() arg #1: converted from 'long double' to 'float'
-test-19.c:141: warning: l1() arg #1: converted from 'char' to 'long'
+test-19.c:141: warning: l1() arg #1: converted from 'signed char' to 'long'
test-19.c:142: warning: l1() arg #1: converted from 'unsigned char' to 'long'
test-19.c:143: warning: l1() arg #1: converted from 'short' to 'long'
test-19.c:144: warning: l1() arg #1: converted from 'unsigned short' to 'long'
@@ -87,7 +99,7 @@ test-19.c:150: warning: l1() arg #1: converted from 'unsigned long long' to 'lon
test-19.c:151: warning: l1() arg #1: converted from 'float' to 'long'
test-19.c:152: warning: l1() arg #1: converted from 'double' to 'long'
test-19.c:153: warning: l1() arg #1: converted from 'long double' to 'long'
-test-19.c:155: warning: ul1() arg #1: converted from 'char' to 'unsigned long'
+test-19.c:155: warning: ul1() arg #1: converted from 'signed char' to 'unsigned long'
test-19.c:156: warning: ul1() arg #1: converted from 'unsigned char' to 'unsigned long'
test-19.c:157: warning: ul1() arg #1: converted from 'short' to 'unsigned long'
test-19.c:158: warning: ul1() arg #1: converted from 'unsigned short' to 'unsigned long'
@@ -102,7 +114,7 @@ test-19.c:164: warning: ul1() arg #1: converted from 'unsigned long long' to 'un
test-19.c:165: warning: ul1() arg #1: converted from 'float' to 'unsigned long'
test-19.c:166: warning: ul1() arg #1: converted from 'double' to 'unsigned long'
test-19.c:167: warning: ul1() arg #1: converted from 'long double' to 'unsigned long'
-test-19.c:169: warning: d1() arg #1: converted from 'char' to 'double'
+test-19.c:169: warning: d1() arg #1: converted from 'signed char' to 'double'
test-19.c:170: warning: d1() arg #1: converted from 'unsigned char' to 'double'
test-19.c:171: warning: d1() arg #1: converted from 'short' to 'double'
test-19.c:172: warning: d1() arg #1: converted from 'unsigned short' to 'double'
@@ -113,7 +125,7 @@ test-19.c:176: warning: d1() arg #1: converted from 'unsigned long' to 'double'
test-19.c:177: warning: d1() arg #1: converted from 'long long' to 'double'
test-19.c:178: warning: d1() arg #1: converted from 'unsigned long long' to 'double'
test-19.c:181: warning: d1() arg #1: converted from 'long double' to 'double'
-test-19.c:183: warning: ll1() arg #1: converted from 'char' to 'long long'
+test-19.c:183: warning: ll1() arg #1: converted from 'signed char' to 'long long'
test-19.c:184: warning: ll1() arg #1: converted from 'unsigned char' to 'long long'
test-19.c:185: warning: ll1() arg #1: converted from 'short' to 'long long'
test-19.c:186: warning: ll1() arg #1: converted from 'unsigned short' to 'long long'
@@ -126,7 +138,7 @@ test-19.c:192: warning: ll1() arg #1: converted from 'unsigned long long' to 'lo
test-19.c:193: warning: ll1() arg #1: converted from 'float' to 'long long'
test-19.c:194: warning: ll1() arg #1: converted from 'double' to 'long long'
test-19.c:195: warning: ll1() arg #1: converted from 'long double' to 'long long'
-test-19.c:197: warning: ull1() arg #1: converted from 'char' to 'unsigned long long'
+test-19.c:197: warning: ull1() arg #1: converted from 'signed char' to 'unsigned long long'
test-19.c:198: warning: ull1() arg #1: converted from 'unsigned char' to 'unsigned long long'
test-19.c:199: warning: ull1() arg #1: converted from 'short' to 'unsigned long long'
test-19.c:200: warning: ull1() arg #1: converted from 'unsigned short' to 'unsigned long long'
@@ -139,7 +151,7 @@ test-19.c:205: warning: ull1() arg #1: converted from 'long long' to 'unsigned l
test-19.c:207: warning: ull1() arg #1: converted from 'float' to 'unsigned long long'
test-19.c:208: warning: ull1() arg #1: converted from 'double' to 'unsigned long long'
test-19.c:209: warning: ull1() arg #1: converted from 'long double' to 'unsigned long long'
-test-19.c:211: warning: ld1() arg #1: converted from 'char' to 'long double'
+test-19.c:211: warning: ld1() arg #1: converted from 'signed char' to 'long double'
test-19.c:212: warning: ld1() arg #1: converted from 'unsigned char' to 'long double'
test-19.c:213: warning: ld1() arg #1: converted from 'short' to 'long double'
test-19.c:214: warning: ld1() arg #1: converted from 'unsigned short' to 'long double'