All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2] syscalls/unlinkat01: Bugfix and update to new API
Date: Fri, 7 May 2021 18:24:57 +0200	[thread overview]
Message-ID: <YJVp2SHmyvRsDSNs@pevik> (raw)
In-Reply-To: <20210506093201.3129-1-zhaogongyi@huawei.com>

Hi Zhao,

> +static struct tcase {
> +	int fd;
> +	char *filename;
FYI this required adding const:

unlinkat01.c:43:13: warning: initialization discards ?const? qualifier from pointer target type [-Wdiscarded-qualifiers]
   43 |         {0, testfile, 0, 0},
      |             ^~~~~~~~
unlinkat01.c:45:13: warning: initialization discards ?const? qualifier from pointer target type [-Wdiscarded-qualifiers]
   45 |         {0, testfile, 0, ENOTDIR},
      |             ^~~~~~~~
unlinkat01.c:46:15: warning: initialization discards ?const? qualifier from pointer target type [-Wdiscarded-qualifiers]
   46 |         {100, testfile, 0, EBADF},
      |               ^~~~~~~~
unlinkat01.c:47:13: warning: initialization discards ?const? qualifier from pointer target type [-Wdiscarded-qualifiers]
   47 |         {0, testfile, 9999, EINVAL},
      |             ^~~~~~~~
unlinkat01.c:48:20: warning: initialization discards ?const? qualifier from pointer target type [-Wdiscarded-qualifiers]
   48 |         {AT_FDCWD, testfile, 0, 0},
      |                    ^~~~~~~~
unlinkat01.c:49:13: warning: initialization discards ?const? qualifier from pointer target type [-Wdiscarded-qualifiers]
   49 |         {0, subpathname, AT_REMOVEDIR, 0},
      |             ^~~~~~~~~~~

Please next time try to not introduce new warnings.

Thanks, merged!

Kind regards,
Petr

> +	int flag;
> +	int exp_errno;
> +} tc[] = {
> +	{0, testfile, 0, 0},
> +	{0, NULL, 0, 0},
> +	{0, testfile, 0, ENOTDIR},
> +	{100, testfile, 0, EBADF},
> +	{0, testfile, 9999, EINVAL},
> +	{AT_FDCWD, testfile, 0, 0},
> +	{0, subpathname, AT_REMOVEDIR, 0},

      reply	other threads:[~2021-05-07 16:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-06  9:32 [LTP] [PATCH v2] syscalls/unlinkat01: Bugfix and update to new API Zhao Gongyi
2021-05-07 16:24 ` Petr Vorel [this message]

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=YJVp2SHmyvRsDSNs@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    /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.