public inbox for eudev@lists.gentoo.org
 help / color / mirror / Atom feed
* [eudev] [PATCH] util.c: cleanup warnings
@ 2017-12-02 17:24 Marcus Folkesson
  0 siblings, 0 replies; only message in thread
From: Marcus Folkesson @ 2017-12-02 17:24 UTC (permalink / raw
  To: eudev; +Cc: marcus.folkesson

Resolve warning:
util.c:1730:23: warning: passing argument 1 of ‘__xpg_basename’ discards
‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]

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.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-02 17:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-02 17:24 [eudev] [PATCH] util.c: cleanup warnings Marcus Folkesson

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