Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/usr.bin/xlint/lint1 lint: normalize whitespace in tests
details: https://anonhg.NetBSD.org/src/rev/59eac3a30141
branches: trunk
changeset: 949759:59eac3a30141
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Jan 16 12:57:37 2021 +0000
description:
lint: normalize whitespace in tests
diffstat:
tests/usr.bin/xlint/lint1/d_c99_anon_struct.c | 1 -
tests/usr.bin/xlint/lint1/d_c99_recursive_init.c | 2 +-
tests/usr.bin/xlint/lint1/d_c99_struct_init.c | 2 +-
tests/usr.bin/xlint/lint1/d_c99_union_init1.c | 2 +-
tests/usr.bin/xlint/lint1/d_c99_union_init2.c | 2 +-
tests/usr.bin/xlint/lint1/d_c99_union_init3.c | 2 +-
tests/usr.bin/xlint/lint1/d_c99_union_init4.c | 14 ++++----
tests/usr.bin/xlint/lint1/d_cast_init.c | 27 +++++-------------
tests/usr.bin/xlint/lint1/d_typefun.c | 35 +++++++++++++----------
tests/usr.bin/xlint/lint1/msg_330.c | 6 ++--
10 files changed, 43 insertions(+), 50 deletions(-)
diffs (197 lines):
diff -r 8e669f419f36 -r 59eac3a30141 tests/usr.bin/xlint/lint1/d_c99_anon_struct.c
--- a/tests/usr.bin/xlint/lint1/d_c99_anon_struct.c Sat Jan 16 09:09:37 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_anon_struct.c Sat Jan 16 12:57:37 2021 +0000
@@ -23,4 +23,3 @@
b.top_left.x = 1;
return 0;
}
-
diff -r 8e669f419f36 -r 59eac3a30141 tests/usr.bin/xlint/lint1/d_c99_recursive_init.c
--- a/tests/usr.bin/xlint/lint1/d_c99_recursive_init.c Sat Jan 16 09:09:37 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_recursive_init.c Sat Jan 16 12:57:37 2021 +0000
@@ -7,7 +7,7 @@
char uc;
} u;
char *s;
-} c[] = {
+} c[] = {
{ .s = "foo", .c = 'b', .u = { .uc = 'c' } },
{ .i = 1, .c = 'a', .u = { .us = 2 } },
};
diff -r 8e669f419f36 -r 59eac3a30141 tests/usr.bin/xlint/lint1/d_c99_struct_init.c
--- a/tests/usr.bin/xlint/lint1/d_c99_struct_init.c Sat Jan 16 09:09:37 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_struct_init.c Sat Jan 16 12:57:37 2021 +0000
@@ -2,7 +2,7 @@
struct {
int i;
char *s;
-} c[] = {
+} c[] = {
{ .i = 2, },
{ .s = "foo" },
{ .i = 1, .s = "bar" },
diff -r 8e669f419f36 -r 59eac3a30141 tests/usr.bin/xlint/lint1/d_c99_union_init1.c
--- a/tests/usr.bin/xlint/lint1/d_c99_union_init1.c Sat Jan 16 09:09:37 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_union_init1.c Sat Jan 16 12:57:37 2021 +0000
@@ -2,7 +2,7 @@
union {
int i;
char *s;
-} c[] = {
+} c[] = {
{ i: 1 },
{ s: "foo" }
};
diff -r 8e669f419f36 -r 59eac3a30141 tests/usr.bin/xlint/lint1/d_c99_union_init2.c
--- a/tests/usr.bin/xlint/lint1/d_c99_union_init2.c Sat Jan 16 09:09:37 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_union_init2.c Sat Jan 16 12:57:37 2021 +0000
@@ -2,7 +2,7 @@
union {
int i[10];
short s;
-} c[] = {
+} c[] = {
{ s: 2 },
{ i: { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } },
};
diff -r 8e669f419f36 -r 59eac3a30141 tests/usr.bin/xlint/lint1/d_c99_union_init3.c
--- a/tests/usr.bin/xlint/lint1/d_c99_union_init3.c Sat Jan 16 09:09:37 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_union_init3.c Sat Jan 16 12:57:37 2021 +0000
@@ -2,7 +2,7 @@
struct {
int i[10];
char *s;
-} c[] = {
+} c[] = {
{ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
"foo" },
};
diff -r 8e669f419f36 -r 59eac3a30141 tests/usr.bin/xlint/lint1/d_c99_union_init4.c
--- a/tests/usr.bin/xlint/lint1/d_c99_union_init4.c Sat Jan 16 09:09:37 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_union_init4.c Sat Jan 16 12:57:37 2021 +0000
@@ -1,15 +1,15 @@
/* test .data.l[x] */
typedef struct {
- int type;
- union {
- char b[20];
- short s[10];
- long l[5];
+ int type;
+ union {
+ char b[20];
+ short s[10];
+ long l[5];
} data;
} foo;
foo bar = {
- .type = 3,
- .data.l[0] = 4
+ .type = 3,
+ .data.l[0] = 4
};
diff -r 8e669f419f36 -r 59eac3a30141 tests/usr.bin/xlint/lint1/d_cast_init.c
--- a/tests/usr.bin/xlint/lint1/d_cast_init.c Sat Jan 16 09:09:37 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/d_cast_init.c Sat Jan 16 12:57:37 2021 +0000
@@ -1,27 +1,16 @@
/* cast initialization */
+
typedef unsigned char u_char;
-typedef unsigned int size_t;
+
struct sockaddr_x25 {
u_char x25_len;
- u_char x25_family;
- short x25_net;
- char x25_addr[16];
- struct x25opts {
- char op_flags;
- char op_psize;
- char op_wsize;
- char op_speed;
- } x25_opts;
- short x25_udlen;
- char x25_udata[16];
+ u_char x25_family;
+ char x25_udata[4];
};
struct sockaddr_x25 x25_dgmask = {
- (unsigned char)(unsigned char)(unsigned int)(unsigned long)(&((( struct sockaddr_x25 *)0)->x25_udata[1])) ,
- 0,
- 0,
- {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
- {0, 0, 0, 0},
- -1,
- {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
+ (unsigned char)(unsigned char)(unsigned int)(unsigned long)
+ (&((( struct sockaddr_x25 *)0)->x25_udata[1])),
+ 0,
+ {-1, -1, -1, -1},
};
diff -r 8e669f419f36 -r 59eac3a30141 tests/usr.bin/xlint/lint1/d_typefun.c
--- a/tests/usr.bin/xlint/lint1/d_typefun.c Sat Jan 16 09:09:37 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/d_typefun.c Sat Jan 16 12:57:37 2021 +0000
@@ -1,22 +1,27 @@
/* typedef of function parameter */
-typedef void (*free_func) (void * opaque, void* address);
-typedef struct stack_st
-{
- int num;
- char **data;
- int sorted;
+typedef void (*free_func)(void *opaque, void *address);
- int num_alloc;
- int (*comp)(const void *, const void *);
+typedef struct stack_st {
+ int num;
+ char **data;
+ int sorted;
+
+ int num_alloc;
+ int (*comp)(const void *, const void *);
} _STACK; /* Use STACK_OF(...) instead */
typedef void *OPENSSL_BLOCK;
-struct stack_st_OPENSSL_BLOCK { _STACK stack; };
-typedef void *d2i_of_void(void **,const unsigned char **,long); typedef int i2d_of_void(void *,unsigned char **);
+struct stack_st_OPENSSL_BLOCK {
+ _STACK stack;
+};
+
+typedef void *d2i_of_void(void **, const unsigned char **, long);
+typedef int i2d_of_void(void *, unsigned char **);
-struct stack_st_OPENSSL_BLOCK *d2i_ASN1_SET(struct stack_st_OPENSSL_BLOCK **a,
- const unsigned char **pp,
- long length, d2i_of_void *d2i,
- void (*free_func)(OPENSSL_BLOCK), int ex_tag,
- int ex_class);
+struct stack_st_OPENSSL_BLOCK *
+d2i_ASN1_SET(struct stack_st_OPENSSL_BLOCK **a,
+ const unsigned char **pp,
+ long length, d2i_of_void *d2i,
+ void (*free_func)(OPENSSL_BLOCK), int ex_tag,
+ int ex_class);
diff -r 8e669f419f36 -r 59eac3a30141 tests/usr.bin/xlint/lint1/msg_330.c
--- a/tests/usr.bin/xlint/lint1/msg_330.c Sat Jan 16 09:09:37 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_330.c Sat Jan 16 12:57:37 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msg_330.c,v 1.1 2021/01/14 22:18:14 rillig Exp $ */
+/* $NetBSD: msg_330.c,v 1.2 2021/01/16 12:57:37 rillig Exp $ */
# 3 "msg_330.c"
// Test for message: operand of '%s' must be bool, not '%s' [330]
@@ -17,6 +17,6 @@
example(bool b, char c, int i)
{
called(!b);
- called(!c); /* expect: 330 */
- called(!i); /* expect: 330 */
+ called(!c); /* expect: 330 */
+ called(!i); /* expect: 330 */
}
Home |
Main Index |
Thread Index |
Old Index