lint: add quotes around placeholders in 4 messages
This commit is contained in:
parent
0998f09feb
commit
a89419496c
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: c99_bool_strict_suppressed.c,v 1.4 2021/08/08 13:19:51 rillig Exp $ */
|
||||
/* $NetBSD: c99_bool_strict_suppressed.c,v 1.5 2022/06/19 12:14:34 rillig Exp $ */
|
||||
# 3 "c99_bool_strict_suppressed.c"
|
||||
|
||||
/*
|
||||
|
@ -29,7 +29,7 @@ test(_Bool b, int i, const char *p)
|
|||
while (1)
|
||||
break;
|
||||
|
||||
/* suppressed+1: error: operands of '=' have incompatible types (_Bool != int) [107] */
|
||||
/* suppressed+1: error: operands of '=' have incompatible types '_Bool' and 'int' [107] */
|
||||
b = i;
|
||||
|
||||
/* suppressed+1: error: operand of '!' must be bool, not 'int' [330] */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: d_c99_bool_strict.c,v 1.37 2022/02/27 08:31:26 rillig Exp $ */
|
||||
/* $NetBSD: d_c99_bool_strict.c,v 1.38 2022/06/19 12:14:34 rillig Exp $ */
|
||||
# 3 "d_c99_bool_strict.c"
|
||||
|
||||
/*
|
||||
|
@ -226,17 +226,17 @@ strict_bool_bit_fields(void)
|
|||
bool b;
|
||||
|
||||
b = flags.bool_flag;
|
||||
/* expect+1: error: operands of '=' have incompatible types (_Bool != unsigned int) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types '_Bool' and 'unsigned int' [107] */
|
||||
b = flags.uint_flag;
|
||||
flags.bool_flag = b;
|
||||
/* expect+1: error: operands of '=' have incompatible types (unsigned int != _Bool) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types 'unsigned int' and '_Bool' [107] */
|
||||
flags.uint_flag = b;
|
||||
|
||||
b = flags_ptr->bool_flag;
|
||||
/* expect+1: error: operands of '=' have incompatible types (_Bool != unsigned int) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types '_Bool' and 'unsigned int' [107] */
|
||||
b = flags_ptr->uint_flag;
|
||||
flags_ptr->bool_flag = b;
|
||||
/* expect+1: error: operands of '=' have incompatible types (unsigned int != _Bool) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types 'unsigned int' and '_Bool' [107] */
|
||||
flags_ptr->uint_flag = b;
|
||||
}
|
||||
|
||||
|
@ -373,23 +373,23 @@ strict_bool_conversion_between_bool_and_int(void)
|
|||
bool b;
|
||||
int i;
|
||||
|
||||
/* expect+1: error: operands of '=' have incompatible types (_Bool != int) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types '_Bool' and 'int' [107] */
|
||||
b = 0;
|
||||
b = __lint_false;
|
||||
/* expect+1: error: operands of '=' have incompatible types (_Bool != int) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types '_Bool' and 'int' [107] */
|
||||
b = 1;
|
||||
b = __lint_true;
|
||||
|
||||
i = 0;
|
||||
/* expect+1: error: operands of '=' have incompatible types (int != _Bool) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types 'int' and '_Bool' [107] */
|
||||
i = __lint_false;
|
||||
i = 1;
|
||||
/* expect+1: error: operands of '=' have incompatible types (int != _Bool) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types 'int' and '_Bool' [107] */
|
||||
i = __lint_true;
|
||||
|
||||
/* expect+1: error: operands of '=' have incompatible types (int != _Bool) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types 'int' and '_Bool' [107] */
|
||||
i = b;
|
||||
/* expect+1: error: operands of '=' have incompatible types (_Bool != int) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types '_Bool' and 'int' [107] */
|
||||
b = i;
|
||||
}
|
||||
|
||||
|
@ -402,13 +402,13 @@ strict_bool_conversion_from_bool_to_scalar(bool b)
|
|||
double d;
|
||||
void *p;
|
||||
|
||||
/* expect+1: error: operands of '=' have incompatible types (int != _Bool) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types 'int' and '_Bool' [107] */
|
||||
i = b;
|
||||
/* expect+1: error: operands of '=' have incompatible types (unsigned int != _Bool) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types 'unsigned int' and '_Bool' [107] */
|
||||
u = b;
|
||||
/* expect+1: error: operands of '=' have incompatible types (double != _Bool) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types 'double' and '_Bool' [107] */
|
||||
d = b;
|
||||
/* expect+1: error: operands of '=' have incompatible types (pointer != _Bool) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types 'pointer' and '_Bool' [107] */
|
||||
p = b;
|
||||
}
|
||||
|
||||
|
@ -554,14 +554,14 @@ strict_bool_operand_binary_dot_arrow(void)
|
|||
struct bool_struct bs = { __lint_true };
|
||||
b = bs.b;
|
||||
bs.b = b;
|
||||
/* expect+1: error: operands of '=' have incompatible types (_Bool != int) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types '_Bool' and 'int' [107] */
|
||||
bs.b = 0;
|
||||
|
||||
/* Access a struct member using the '->' operator. */
|
||||
struct bool_struct *bsp = &bs;
|
||||
b = bsp->b;
|
||||
bsp->b = b;
|
||||
/* expect+1: error: operands of '=' have incompatible types (_Bool != int) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types '_Bool' and 'int' [107] */
|
||||
bsp->b = 0;
|
||||
}
|
||||
|
||||
|
@ -722,9 +722,9 @@ strict_bool_operand_binary_all(bool b, unsigned u)
|
|||
/* expect+1: error: right operand of '>>' must not be bool [337] */
|
||||
u = u >> b;
|
||||
u = b ? u : u;
|
||||
/* expect+1: error: operands of ':' have incompatible types (_Bool != unsigned int) [107] */
|
||||
/* expect+1: error: operands of ':' have incompatible types '_Bool' and 'unsigned int' [107] */
|
||||
u = b ? b : u;
|
||||
/* expect+1: error: operands of ':' have incompatible types (unsigned int != _Bool) [107] */
|
||||
/* expect+1: error: operands of ':' have incompatible types 'unsigned int' and '_Bool' [107] */
|
||||
u = b ? u : b;
|
||||
}
|
||||
|
||||
|
@ -747,13 +747,13 @@ strict_bool_operand_binary_comma(bool b, int i)
|
|||
void
|
||||
strict_bool_operator_result(bool b)
|
||||
{
|
||||
/* expect+1: error: operands of 'init' have incompatible types (char != _Bool) [107] */
|
||||
/* expect+1: error: operands of 'init' have incompatible types 'char' and '_Bool' [107] */
|
||||
char c = b;
|
||||
/* expect+1: error: operands of 'init' have incompatible types (int != _Bool) [107] */
|
||||
/* expect+1: error: operands of 'init' have incompatible types 'int' and '_Bool' [107] */
|
||||
int i = b;
|
||||
/* expect+1: error: operands of 'init' have incompatible types (double != _Bool) [107] */
|
||||
/* expect+1: error: operands of 'init' have incompatible types 'double' and '_Bool' [107] */
|
||||
double d = b;
|
||||
/* expect+1: error: operands of 'init' have incompatible types (pointer != _Bool) [107] */
|
||||
/* expect+1: error: operands of 'init' have incompatible types 'pointer' and '_Bool' [107] */
|
||||
void *p = b;
|
||||
|
||||
/* The right-hand sides of these assignments are all ok. */
|
||||
|
@ -771,23 +771,23 @@ strict_bool_operator_result(bool b)
|
|||
* The right-hand sides of these assignments are not ok, they
|
||||
* implicitly convert from bool to int.
|
||||
*/
|
||||
/* expect+1: error: operands of '=' have incompatible types (int != _Bool) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types 'int' and '_Bool' [107] */
|
||||
i = !b;
|
||||
/* expect+1: error: operands of '=' have incompatible types (int != _Bool) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types 'int' and '_Bool' [107] */
|
||||
i = i == i;
|
||||
/* expect+1: error: operands of '=' have incompatible types (int != _Bool) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types 'int' and '_Bool' [107] */
|
||||
i = i != i;
|
||||
/* expect+1: error: operands of '=' have incompatible types (int != _Bool) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types 'int' and '_Bool' [107] */
|
||||
i = i < i;
|
||||
/* expect+1: error: operands of '=' have incompatible types (int != _Bool) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types 'int' and '_Bool' [107] */
|
||||
i = i <= i;
|
||||
/* expect+1: error: operands of '=' have incompatible types (int != _Bool) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types 'int' and '_Bool' [107] */
|
||||
i = i >= i;
|
||||
/* expect+1: error: operands of '=' have incompatible types (int != _Bool) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types 'int' and '_Bool' [107] */
|
||||
i = i > i;
|
||||
/* expect+1: error: operands of '=' have incompatible types (int != _Bool) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types 'int' and '_Bool' [107] */
|
||||
i = b && b;
|
||||
/* expect+1: error: operands of '=' have incompatible types (int != _Bool) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types 'int' and '_Bool' [107] */
|
||||
i = b || b;
|
||||
}
|
||||
|
||||
|
@ -827,7 +827,7 @@ strict_bool_bitwise_and_enum(enum Flags flags)
|
|||
* because it would be too confusing if FLAG0 would work and all the
|
||||
* other flags wouldn't.
|
||||
*/
|
||||
/* expect+1: error: operands of '=' have incompatible types (_Bool != int) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types '_Bool' and 'int' [107] */
|
||||
b = flags & FLAG0;
|
||||
|
||||
/*
|
||||
|
@ -836,7 +836,7 @@ strict_bool_bitwise_and_enum(enum Flags flags)
|
|||
* it as 2, as that is the integer value of FLAG1. Since FLAG1 fits
|
||||
* in a uint8_t, no truncation takes place.
|
||||
*/
|
||||
/* expect+1: error: operands of '=' have incompatible types (_Bool != int) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types '_Bool' and 'int' [107] */
|
||||
b = flags & FLAG1;
|
||||
|
||||
/*
|
||||
|
@ -844,7 +844,7 @@ strict_bool_bitwise_and_enum(enum Flags flags)
|
|||
* zero. In a uint8_t, the stored value would be 0 since bit 28 is
|
||||
* out of range for a uint8_t and thus gets truncated.
|
||||
*/
|
||||
/* expect+1: error: operands of '=' have incompatible types (_Bool != int) [107] */
|
||||
/* expect+1: error: operands of '=' have incompatible types '_Bool' and 'int' [107] */
|
||||
b = flags & FLAG28;
|
||||
}
|
||||
|
||||
|
@ -884,7 +884,7 @@ query_flag_from_enum_bit_set(enum Flags flags)
|
|||
void
|
||||
strict_bool_operator_eq_bool_int(void)
|
||||
{
|
||||
/* expect+1: error: operands of '==' have incompatible types (_Bool != int) [107] */
|
||||
/* expect+1: error: operands of '==' have incompatible types '_Bool' and 'int' [107] */
|
||||
(void)(strict_bool_conversion_return_false() == 0);
|
||||
}
|
||||
|
||||
|
@ -940,9 +940,9 @@ initialization(void)
|
|||
} var[] = {
|
||||
{ __lint_false },
|
||||
{ __lint_true },
|
||||
/* expect+1: error: operands of 'init' have incompatible types (_Bool != int) [107] */
|
||||
/* expect+1: error: operands of 'init' have incompatible types '_Bool' and 'int' [107] */
|
||||
{ 0 },
|
||||
/* expect+1: error: operands of 'init' have incompatible types (_Bool != int) [107] */
|
||||
/* expect+1: error: operands of 'init' have incompatible types '_Bool' and 'int' [107] */
|
||||
{ 1 },
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: d_c99_bool_strict_syshdr.c,v 1.16 2022/06/11 14:17:33 rillig Exp $ */
|
||||
/* $NetBSD: d_c99_bool_strict_syshdr.c,v 1.17 2022/06/19 12:14:34 rillig Exp $ */
|
||||
# 3 "d_c99_bool_strict_syshdr.c"
|
||||
|
||||
/*
|
||||
|
@ -78,7 +78,7 @@ strict_bool_system_header_ctype(int c)
|
|||
(int)((ctype_table + 1)[c] & 0x0040) /* INT */
|
||||
# 80 "d_c99_bool_strict_syshdr.c"
|
||||
;
|
||||
/* expect-1: error: operands of 'init' have incompatible types (_Bool != int) [107] */
|
||||
/* expect-1: error: operands of 'init' have incompatible types '_Bool' and 'int' [107] */
|
||||
|
||||
int system_bool_assigned_to_int =
|
||||
# 85 "d_c99_bool_strict_syshdr.c" 3 4
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: d_c99_complex_split.c,v 1.9 2022/01/15 14:22:03 rillig Exp $ */
|
||||
/* $NetBSD: d_c99_complex_split.c,v 1.10 2022/06/19 12:14:34 rillig Exp $ */
|
||||
# 3 "d_c99_complex_split.c"
|
||||
|
||||
/*
|
||||
|
@ -79,7 +79,7 @@ void
|
|||
trigger_warning(double _Complex c)
|
||||
{
|
||||
c += 1.0;
|
||||
/* expect+1: error: operands of '|' have incompatible types (double _Complex != double _Complex) [107] */
|
||||
/* expect+1: error: operands of '|' have incompatible types 'double _Complex' and 'double _Complex' [107] */
|
||||
return c | c;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
/* $NetBSD: msg_033.c,v 1.3 2021/08/27 20:16:50 rillig Exp $ */
|
||||
/* $NetBSD: msg_033.c,v 1.4 2022/06/19 12:14:34 rillig Exp $ */
|
||||
# 3 "msg_033.c"
|
||||
|
||||
// Test for message: duplicate member name: %s [33]
|
||||
// Test for message: duplicate member name '%s' [33]
|
||||
|
||||
/* lint1-extra-flags: -r */
|
||||
|
||||
struct {
|
||||
/* Despite the option '-r', this location is not mentioned. */
|
||||
int member;
|
||||
/* expect+1: error: duplicate member name: member [33] */
|
||||
/* expect+1: error: duplicate member name 'member' [33] */
|
||||
double member;
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: msg_045.c,v 1.4 2022/06/11 11:52:13 rillig Exp $ */
|
||||
/* $NetBSD: msg_045.c,v 1.5 2022/06/19 12:14:34 rillig Exp $ */
|
||||
# 3 "msg_045.c"
|
||||
|
||||
/* Test for message: base type is really '%s %s' [45] */
|
||||
|
@ -16,6 +16,6 @@ function()
|
|||
/* expect+2: error: 'counter' has incomplete type 'incomplete union counter' [31] */
|
||||
/* expect+1: warning: union 'counter' never defined [234] */
|
||||
union counter counter;
|
||||
/* expect+1: warning: illegal member use: value [102] */
|
||||
/* expect+1: warning: illegal use of member 'value' [102] */
|
||||
counter.value++;
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/* $NetBSD: msg_089.c,v 1.4 2022/06/15 20:18:31 rillig Exp $ */
|
||||
/* $NetBSD: msg_089.c,v 1.5 2022/06/19 12:14:34 rillig Exp $ */
|
||||
# 3 "msg_089.c"
|
||||
|
||||
// Test for message: typedef redeclared: %s [89]
|
||||
// Test for message: typedef '%s' redeclared [89]
|
||||
|
||||
typedef int number;
|
||||
/* expect+1: error: typedef redeclared: number [89] */
|
||||
/* expect+1: error: typedef 'number' redeclared [89] */
|
||||
typedef int number;
|
||||
/* expect+1: error: typedef redeclared: number [89] */
|
||||
/* expect+1: error: typedef 'number' redeclared [89] */
|
||||
typedef double number;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: msg_102.c,v 1.3 2021/12/14 18:26:39 rillig Exp $ */
|
||||
/* $NetBSD: msg_102.c,v 1.4 2022/06/19 12:14:34 rillig Exp $ */
|
||||
# 3 "msg_102.c"
|
||||
|
||||
// Test for message: illegal member use: %s [102]
|
||||
// Test for message: illegal use of member '%s' [102]
|
||||
|
||||
// Anonymous members are defined in C11 6.7.2.1p2.
|
||||
|
||||
|
@ -23,7 +23,7 @@ eq(const struct bit_fields_and_bits *a, const struct bit_fields_and_bits *b)
|
|||
* external/mit/xorg/lib/dri.old/Makefile again.
|
||||
*/
|
||||
/* TODO: Add support for C11 anonymous struct and union members. */
|
||||
/* expect+2: error: illegal member use: bits [102] */
|
||||
/* expect+1: error: illegal member use: bits [102] */
|
||||
/* expect+2: error: illegal use of member 'bits' [102] */
|
||||
/* expect+1: error: illegal use of member 'bits' [102] */
|
||||
return a->bits == b->bits;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: msg_105.c,v 1.3 2022/06/15 20:18:31 rillig Exp $ */
|
||||
/* $NetBSD: msg_105.c,v 1.4 2022/06/19 12:14:34 rillig Exp $ */
|
||||
# 3 "msg_105.c"
|
||||
|
||||
/* Test for message: non-unique member requires struct/union %s [105] */
|
||||
|
@ -41,6 +41,6 @@ int
|
|||
member_of_wrong_struct(t)
|
||||
struct three *t;
|
||||
{
|
||||
/* expect+1: error: illegal member use: member [102] */
|
||||
/* expect+1: error: illegal use of member 'member' [102] */
|
||||
return t->member;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/* $NetBSD: msg_107.c,v 1.3 2022/06/16 16:58:36 rillig Exp $ */
|
||||
/* $NetBSD: msg_107.c,v 1.4 2022/06/19 12:14:34 rillig Exp $ */
|
||||
# 3 "msg_107.c"
|
||||
|
||||
// Test for message: operands of '%s' have incompatible types (%s != %s) [107]
|
||||
// Test for message: operands of '%s' have incompatible types '%s' and '%s' [107]
|
||||
|
||||
/* ARGSUSED */
|
||||
void
|
||||
compare(double d, void *ptr)
|
||||
{
|
||||
/* expect+1: error: operands of '==' have incompatible types (double != pointer) [107] */
|
||||
/* expect+1: error: operands of '==' have incompatible types 'double' and 'pointer' [107] */
|
||||
return d == ptr;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: msg_121.c,v 1.5 2022/06/16 16:58:36 rillig Exp $ */
|
||||
/* $NetBSD: msg_121.c,v 1.6 2022/06/19 12:14:34 rillig Exp $ */
|
||||
# 3 "msg_121.c"
|
||||
|
||||
// Test for message: negative shift [121]
|
||||
|
@ -17,6 +17,6 @@ shift_by_double(int x, double amount)
|
|||
* This is already caught by typeok_scalar, so it doesn't reach
|
||||
* typeok_shift via typeok_op.
|
||||
*/
|
||||
/* expect+1: error: operands of '<<' have incompatible types (int != double) [107] */
|
||||
/* expect+1: error: operands of '<<' have incompatible types 'int' and 'double' [107] */
|
||||
return x << amount;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: msg_123.c,v 1.5 2022/06/16 16:58:36 rillig Exp $ */
|
||||
/* $NetBSD: msg_123.c,v 1.6 2022/06/19 12:14:34 rillig Exp $ */
|
||||
# 3 "msg_123.c"
|
||||
|
||||
// Test for message: illegal combination of %s '%s' and %s '%s', op '%s' [123]
|
||||
|
@ -22,13 +22,13 @@ compare(_Bool b, int i, double d, const char *p)
|
|||
ok(d < b);
|
||||
ok(d < i);
|
||||
ok(d < d);
|
||||
/* expect+1: error: operands of '<' have incompatible types (double != pointer) [107] */
|
||||
/* expect+1: error: operands of '<' have incompatible types 'double' and 'pointer' [107] */
|
||||
bad(d < p);
|
||||
/* expect+1: warning: illegal combination of pointer 'pointer to const char' and integer '_Bool', op '<' [123] */
|
||||
bad(p < b);
|
||||
/* expect+1: warning: illegal combination of pointer 'pointer to const char' and integer 'int', op '<' [123] */
|
||||
bad(p < i);
|
||||
/* expect+1: error: operands of '<' have incompatible types (pointer != double) [107] */
|
||||
/* expect+1: error: operands of '<' have incompatible types 'pointer' and 'double' [107] */
|
||||
bad(p < d);
|
||||
ok(p < p);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: msg_132.c,v 1.18 2022/06/16 16:58:36 rillig Exp $ */
|
||||
/* $NetBSD: msg_132.c,v 1.19 2022/06/19 12:14:34 rillig Exp $ */
|
||||
# 3 "msg_132.c"
|
||||
|
||||
// Test for message: conversion from '%s' to '%s' may lose accuracy [132]
|
||||
|
@ -143,7 +143,7 @@ to_bool(long a, long b)
|
|||
const char *
|
||||
cover_build_plus_minus(const char *arr, double idx)
|
||||
{
|
||||
/* expect+3: error: operands of '+' have incompatible types (pointer != double) [107] */
|
||||
/* expect+3: error: operands of '+' have incompatible types 'pointer' and 'double' [107] */
|
||||
/* expect+2: warning: function 'cover_build_plus_minus' expects to return value [214] */
|
||||
if (idx > 0.0)
|
||||
return arr + idx;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ckbool.c,v 1.17 2022/06/15 18:29:21 rillig Exp $ */
|
||||
/* $NetBSD: ckbool.c,v 1.18 2022/06/19 12:14:33 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2021 The NetBSD Foundation, Inc.
|
||||
|
@ -36,7 +36,7 @@
|
|||
#include <sys/cdefs.h>
|
||||
|
||||
#if defined(__RCSID)
|
||||
__RCSID("$NetBSD: ckbool.c,v 1.17 2022/06/15 18:29:21 rillig Exp $");
|
||||
__RCSID("$NetBSD: ckbool.c,v 1.18 2022/06/19 12:14:33 rillig Exp $");
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
@ -126,7 +126,7 @@ typeok_strict_bool_binary_compatible(op_t op, int arg,
|
|||
/* return value type mismatch (%s) and (%s) */
|
||||
error(211, tspec_name(lt), tspec_name(rt));
|
||||
} else {
|
||||
/* operands of '%s' have incompatible types (%s != %s) */
|
||||
/* operands of '%s' have incompatible types '%s' and '%s' */
|
||||
error(107, op_name(op), tspec_name(lt), tspec_name(rt));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: decl.c,v 1.288 2022/06/19 11:50:42 rillig Exp $ */
|
||||
/* $NetBSD: decl.c,v 1.289 2022/06/19 12:14:33 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
|
||||
|
@ -38,7 +38,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(__RCSID)
|
||||
__RCSID("$NetBSD: decl.c,v 1.288 2022/06/19 11:50:42 rillig Exp $");
|
||||
__RCSID("$NetBSD: decl.c,v 1.289 2022/06/19 12:14:33 rillig Exp $");
|
||||
#endif
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -1124,7 +1124,7 @@ declarator_1_struct_union(sym_t *dsym)
|
|||
|
||||
if (dsym->u.s_member.sm_sou_type ==
|
||||
dcs->d_redeclared_symbol->u.s_member.sm_sou_type) {
|
||||
/* duplicate member name: %s */
|
||||
/* duplicate member name '%s' */
|
||||
error(33, dsym->s_name);
|
||||
rmsym(dcs->d_redeclared_symbol);
|
||||
}
|
||||
|
@ -2120,7 +2120,7 @@ check_redeclaration(sym_t *dsym, bool *dowarn)
|
|||
return true;
|
||||
}
|
||||
if (rsym->s_scl == TYPEDEF) {
|
||||
/* typedef redeclared: %s */
|
||||
/* typedef '%s' redeclared */
|
||||
error(89, dsym->s_name);
|
||||
print_previous_declaration(-1, rsym);
|
||||
return true;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: err.c,v 1.171 2022/06/19 11:50:42 rillig Exp $ */
|
||||
/* $NetBSD: err.c,v 1.172 2022/06/19 12:14:33 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Jochen Pohl
|
||||
|
@ -37,7 +37,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(__RCSID)
|
||||
__RCSID("$NetBSD: err.c,v 1.171 2022/06/19 11:50:42 rillig Exp $");
|
||||
__RCSID("$NetBSD: err.c,v 1.172 2022/06/19 12:14:33 rillig Exp $");
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -87,7 +87,7 @@ static const char *const msgs[] = {
|
|||
"redeclaration of '%s'; ANSI C requires static", /* 30 */
|
||||
"'%s' has incomplete type '%s'", /* 31 */
|
||||
"argument type defaults to 'int': %s", /* 32 */
|
||||
"duplicate member name: %s", /* 33 */
|
||||
"duplicate member name '%s'", /* 33 */
|
||||
"nonportable bit-field type '%s'", /* 34 */
|
||||
"illegal bit-field type '%s'", /* 35 */
|
||||
"illegal bit-field size: %d", /* 36 */
|
||||
|
@ -143,7 +143,7 @@ static const char *const msgs[] = {
|
|||
"automatic hides external declaration: %s", /* 86 */
|
||||
"static hides external declaration: %s", /* 87 */
|
||||
"typedef hides external declaration: %s", /* 88 */
|
||||
"typedef redeclared: %s", /* 89 */
|
||||
"typedef '%s' redeclared", /* 89 */
|
||||
"inconsistent redeclaration of extern: %s", /* 90 */
|
||||
"declaration hides parameter: %s", /* 91 */
|
||||
"inconsistent redeclaration of static: %s", /* 92 */
|
||||
|
@ -156,12 +156,12 @@ static const char *const msgs[] = {
|
|||
"'%s' undefined", /* 99 */
|
||||
"unary + is illegal in traditional C", /* 100 */
|
||||
"type '%s' does not have member '%s'", /* 101 */
|
||||
"illegal member use: %s", /* 102 */
|
||||
"illegal use of member '%s'", /* 102 */
|
||||
"left operand of '.' must be struct or union, not '%s'", /* 103 */
|
||||
"left operand of '->' must be pointer to struct or union, not '%s'", /* 104 */
|
||||
"non-unique member requires struct/union %s", /* 105 */
|
||||
"left operand of '->' must be pointer", /* 106 */
|
||||
"operands of '%s' have incompatible types (%s != %s)", /* 107 */
|
||||
"operands of '%s' have incompatible types '%s' and '%s'", /* 107 */
|
||||
"operand of '%s' has invalid type (%s)", /* 108 */
|
||||
"void type illegal in expression", /* 109 */
|
||||
"pointer to function is not allowed here", /* 110 */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tree.c,v 1.453 2022/06/15 18:29:21 rillig Exp $ */
|
||||
/* $NetBSD: tree.c,v 1.454 2022/06/19 12:14:33 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Jochen Pohl
|
||||
|
@ -37,7 +37,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(__RCSID)
|
||||
__RCSID("$NetBSD: tree.c,v 1.453 2022/06/15 18:29:21 rillig Exp $");
|
||||
__RCSID("$NetBSD: tree.c,v 1.454 2022/06/19 12:14:33 rillig Exp $");
|
||||
#endif
|
||||
|
||||
#include <float.h>
|
||||
|
@ -643,10 +643,10 @@ struct_or_union_member(tnode_t *tn, op_t op, sym_t *msym)
|
|||
*/
|
||||
if (str != NULL) {
|
||||
if (eq && !allow_c90) {
|
||||
/* illegal member use: %s */
|
||||
/* illegal use of member '%s' */
|
||||
warning(102, msym->s_name);
|
||||
} else {
|
||||
/* illegal member use: %s */
|
||||
/* illegal use of member '%s' */
|
||||
error(102, msym->s_name);
|
||||
}
|
||||
return msym;
|
||||
|
@ -2898,7 +2898,7 @@ warn_incompatible_types(op_t op,
|
|||
error(171, type_name(ltp), type_name(rtp));
|
||||
}
|
||||
} else if (mp->m_binary) {
|
||||
/* operands of '%s' have incompatible types (%s != %s) */
|
||||
/* operands of '%s' have incompatible types '%s' and '%s' */
|
||||
error(107, mp->m_name, tspec_name(lt), tspec_name(rt));
|
||||
} else {
|
||||
lint_assert(rt == NOTSPEC);
|
||||
|
|
Loading…
Reference in New Issue