]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
tools/xenstat: Fix -Wunused-function issue
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 13 Aug 2019 14:14:19 +0000 (15:14 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 14 Aug 2019 11:04:20 +0000 (12:04 +0100)
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>
tools/xenstat/libxenstat/src/xenstat.c

index bba143eb53d038e74bee7b279c8c427f016ce121..6f93d4e98247a0422e12d7594b5d3a6e1f695b56 100644 (file)
@@ -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