On 24.11.19 13:38, [email protected] wrote:
> Patchew URL: https://patchew.org/QEMU/[email protected]/
> ...
> This series seems to have some coding style problems. See output below for
> more information:
>
> Subject: [PATCH v2] linux-user/strace: Improve strace output for read() and 
> getcwd()
> ...
> === OUTPUT BEGIN ===
> WARNING: line over 80 characters
> #51: FILE: linux-user/strace.c:64:
> +UNUSED static void print_encoded_string(abi_long addr, unsigned int maxlen, 
> int last);
>
> ERROR: storage class should be at the beginning of the declaration
> #51: FILE: linux-user/strace.c:64:
> +UNUSED static void print_encoded_string(abi_long addr, unsigned int maxlen, 
> int last);

IMHO the error is bogus.
This is the part of the patch:

diff --git a/linux-user/strace.c b/linux-user/strace.c
index de43238fa4..dc963accd5 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -61,6 +61,7 @@ UNUSED static void print_open_flags(abi_long, int);
 UNUSED static void print_syscall_prologue(const struct syscallname *);
 UNUSED static void print_syscall_epilogue(const struct syscallname *);
 UNUSED static void print_string(abi_long, int);
+UNUSED static void print_encoded_string(abi_long addr, unsigned int maxlen, 
int last);
 UNUSED static void print_buf(abi_long addr, abi_long len, int last);
 UNUSED static void print_raw_param(const char *, abi_long, int);
 UNUSED static void print_timeval(abi_ulong, int);

Maybe the warning is somewhat real, but *if* I should cut the line to
less than 80 chars, where should I break it?
E.g. like this?

+UNUSED static void print_encoded_string(abi_long addr, unsigned int maxlen,
+                                        int last);
 UNUSED static void print_buf(abi_long addr, abi_long len, int last);

Helge

Reply via email to