From: "xuyang2018.jy@fujitsu.com" <xuyang2018.jy@fujitsu.com>
To: Richard Palethorpe <rpalethorpe@suse.com>
Cc: "ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: Re: [LTP] [COMMITTED] save_restore: remove the duplicate 'const' declaration
Date: Thu, 10 Mar 2022 09:06:02 +0000 [thread overview]
Message-ID: <6229BFAD.1060504@fujitsu.com> (raw)
In-Reply-To: <6229B934.9040606@fujitsu.com>
Hi Richard
> Hi Li
>> --- a/lib/newlib_tests/test19.c
>> +++ b/lib/newlib_tests/test19.c
>> @@ -23,7 +23,7 @@ static struct tst_test test = {
>> .needs_root = 1,
>> .test_all = run,
>> .setup = setup,
>> - .save_restore = (const struct tst_path_val const[]) {
>> + .save_restore = (const struct tst_path_val[]) {
>> {"?/proc/nonexistent", NULL},
>> {"!/proc/sys/kernel/numa_balancing", NULL},
>> {"/proc/sys/kernel/core_pattern", NULL},
>
> Since tst_path_val is a struct array, we should use {NULL, NULL} or {}
> terminated instead of NULL terminated , otherwise it will report missing
> braces warning.
Since we have the following rule
LTP-005 Array must terminate with a sentinel value (i.e. NULL or '{}')
Can we check struct array whether use {} terminated instead of NULL?
Best Regards
Yang Xu
>
> Best Regards
> Yang Xu
>
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-03-10 9:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-10 8:22 [LTP] [COMMITTED] save_restore: remove the duplicate 'const' declaration Li Wang
2022-03-10 8:38 ` xuyang2018.jy
2022-03-10 8:45 ` Li Wang
2022-03-10 8:53 ` xuyang2018.jy
2022-03-10 8:58 ` Li Wang
2022-03-10 9:06 ` xuyang2018.jy [this message]
2022-03-10 12:09 ` Richard Palethorpe
2022-03-11 1:18 ` xuyang2018.jy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6229BFAD.1060504@fujitsu.com \
--to=xuyang2018.jy@fujitsu.com \
--cc=ltp@lists.linux.it \
--cc=rpalethorpe@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.