public inbox for eudev@lists.gentoo.org
 help / color / mirror / Atom feed
* [eudev] [PATCH 1/3] shared: typecast away 'const' qualifier from pointer
@ 2018-02-18 19:47 Marcus Folkesson
  2018-02-18 19:47 ` [eudev] [PATCH 2/3] rules: update Marcus Folkesson
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Marcus Folkesson @ 2018-02-18 19:47 UTC (permalink / raw
  To: eudev; +Cc: Marcus Folkesson

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



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-02-19  7:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-18 19:47 [eudev] [PATCH 1/3] shared: typecast away 'const' qualifier from pointer Marcus Folkesson
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox