public inbox for eudev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Marcus Folkesson <marcus.folkesson@gmail.com>
To: eudev@lists.gentoo.org
Cc: Marcus Folkesson <marcus.folkesson@gmail.com>
Subject: [eudev] [PATCH 1/3] shared: typecast away 'const' qualifier from pointer
Date: Sun, 18 Feb 2018 20:47:19 +0100	[thread overview]
Message-ID: <20180218194721.3604-1-marcus.folkesson@gmail.com> (raw)

Get rid of this warning:
 warning: passing argument 1 of ‘__xpg_basename’ discards ‘const’
 qualifier from pointer target type [-Wdiscarded-qualifiers]
          fn = basename(p);

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 src/shared/util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/shared/util.c b/src/shared/util.c
index ac69ae80e..9e36050a0 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -1726,7 +1726,7 @@ int tempfn_xxxxxx(const char *p, char **ret) {
          *         /foo/bar/.#waldoXXXXXX
          */
 
-        fn = basename(p);
+        fn = basename((char*)p);
         if (!filename_is_valid(fn))
                 return -EINVAL;
 
-- 
2.15.1



             reply	other threads:[~2018-02-18 19:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-18 19:47 Marcus Folkesson [this message]
2018-02-18 19:47 ` [eudev] [PATCH 2/3] rules: update Marcus Folkesson
2018-02-19  3:00   ` Anthony G. Basile
2018-02-19  6:26     ` Marcus Folkesson
2018-02-19  7:26       ` Anthony G. Basile
2018-02-18 19:47 ` [eudev] [PATCH 3/3] hwdb: update Marcus Folkesson
2018-02-19  2:58 ` [eudev] [PATCH 1/3] shared: typecast away 'const' qualifier from pointer Anthony G. Basile
2018-02-19  6:20   ` Marcus Folkesson

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=20180218194721.3604-1-marcus.folkesson@gmail.com \
    --to=marcus.folkesson@gmail.com \
    --cc=eudev@lists.gentoo.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox