]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - tools/perf/util/color.c
perf: Enable more compiler warnings
[mirror_ubuntu-zesty-kernel.git] / tools / perf / util / color.c
index 90a044d1fe7dffe526a50d8afdb5ac888ff31209..e47fdeb85391bfcda7a20361ebc180f8f779dc21 100644 (file)
@@ -242,9 +242,9 @@ int color_fwrite_lines(FILE *fp, const char *color,
        return 0;
 }
 
-char *get_percent_color(double percent)
+const char *get_percent_color(double percent)
 {
-       char *color = PERF_COLOR_NORMAL;
+       const char *color = PERF_COLOR_NORMAL;
 
        /*
         * We color high-overhead entries in red, mid-overhead
@@ -263,7 +263,7 @@ char *get_percent_color(double percent)
 int percent_color_fprintf(FILE *fp, const char *fmt, double percent)
 {
        int r;
-       char *color;
+       const char *color;
 
        color = get_percent_color(percent);
        r = color_fprintf(fp, color, fmt, percent);