public inbox for eudev@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* [eudev] [PATCH 1/3] shared: typecast away 'const' qualifier from pointer
@ 2018-02-18 19:47 99% Marcus Folkesson
  0 siblings, 0 replies; 1+ results
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	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2018-02-18 19:47 99% [eudev] [PATCH 1/3] shared: typecast away 'const' qualifier from pointer Marcus Folkesson

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