diff options
| author | Heinrich Schuchardt <[email protected]> | 2026-04-18 08:32:13 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-04-24 11:28:17 -0600 |
| commit | b67267c6211528747faf0552b82e2170aede5045 (patch) | |
| tree | 50bc0c74df0fb50199acaea12288aba2f3841653 /scripts/checkpatch.pl | |
| parent | d64c4a69585aa096c693c0b7ec4e6e04333fc45f (diff) | |
tools/asn1_compiler: avoid -Wdiscarded-qualifiers
Building with GCC 15.2 results in warnings:
tools/asn1_compiler.c: In function ‘tokenise’:
tools/asn1_compiler.c:442:37: warning:
assignment discards ‘const’ qualifier from pointer target type
[-Wdiscarded-qualifiers]
442 | dir = bsearch(&tokens[tix], directives,
| ^
tools/asn1_compiler.c: In function ‘main’:
tools/asn1_compiler.c:632:11: warning:
assignment discards ‘const’ qualifier from pointer target type
[-Wdiscarded-qualifiers]
632 | p = strchr(grammar_name, '.');
| ^
bsearch() is defined as
void *bsearch(size_t n, size_t size;
const void key[size], const void base[size * n],
size_t n, size_t size,
typeof(int (const void [size], const void [size]))
*compar);
* Use the correct type for dir.
strchr() is defined as
char *strchr(const char *s, int c).
* Use a conversion for the assignment to p.
Signed-off-by: Heinrich Schuchardt <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'scripts/checkpatch.pl')
0 files changed, 0 insertions, 0 deletions
