diff mbox series

[2/1] toos/xenstat: Fix -Wunused-function issue

Message ID 20190813142128.18551-1-andrew.cooper3@citrix.com (mailing list archive)
State New, archived
Headers show
Series tools/xenstat: Fix -Wformat-truncation= issue | expand

Commit Message

Andrew Cooper Aug. 13, 2019, 2:21 p.m. UTC
When compiling xenstat with -Werror, Clang complains:

  src/xenstat.c:134:34: error: unused function 'parse' [-Werror,-Wunused-function]
  static inline unsigned long long parse(char *s, char *match)
                                   ^
  1 error generated.

Drop the function.  It really is unused.

Spotted by Travis-CI.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Ian Jackson <Ian.Jackson@citrix.com>
CC: Wei Liu <wl@xen.org>
---
 tools/xenstat/libxenstat/src/xenstat.c | 14 --------------
 1 file changed, 14 deletions(-)

Comments

Wei Liu Aug. 14, 2019, 10:38 a.m. UTC | #1
On Tue, Aug 13, 2019 at 03:21:28PM +0100, Andrew Cooper wrote:
> When compiling xenstat with -Werror, Clang complains:
> 
>   src/xenstat.c:134:34: error: unused function 'parse' [-Werror,-Wunused-function]
>   static inline unsigned long long parse(char *s, char *match)
>                                    ^
>   1 error generated.
> 
> Drop the function.  It really is unused.
> 
> Spotted by Travis-CI.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Acked-by: Wei Liu <wl@xen.org>
diff mbox series

Patch

diff --git a/tools/xenstat/libxenstat/src/xenstat.c b/tools/xenstat/libxenstat/src/xenstat.c
index bba143eb53..6f93d4e982 100644
--- a/tools/xenstat/libxenstat/src/xenstat.c
+++ b/tools/xenstat/libxenstat/src/xenstat.c
@@ -131,20 +131,6 @@  void xenstat_uninit(xenstat_handle * handle)
 	}
 }
 
-static inline unsigned long long parse(char *s, char *match)
-{
-	char *s1 = strstr(s,match);
-	unsigned long long ret;
-
-	if ( s1 == NULL )
-		return 0LL;
-	s1 += 2;
-	if ( *s1++ != ':' )
-		return 0LL;
-	sscanf(s1,"%llu",&ret);
-	return ret;
-}
-
 xenstat_node *xenstat_get_node(xenstat_handle * handle, unsigned int flags)
 {
 #define DOMAIN_CHUNK_SIZE 256