lkml.org 
[lkml]   [2015]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v13 02/14] perf, tools, jevents: Program to convert JSON file to C style file
On Tue, Jun 02, 2015 at 10:12:02AM -0700, Sukadev Bhattiprolu wrote:

SNIP

> +
> +static int process_mapfile(FILE *outfp, char *fpath)
> +{
> + int n = 16384;
> + FILE *mapfp;
> + char *save;
> + char *line, *p;
> + int line_num;
> + char *tblname;
> +
> + pr_info("%s: Processing mapfile %s\n", prog, fpath);

SNIP

> +
> + cpuid = strtok_r(p, ",", &save);
> + version = strtok_r(NULL, ",", &save);
> + fname = strtok_r(NULL, ",", &save);
> + type = strtok_r(NULL, ",", &save);
> +
> + tblname = file_name_to_table_name(fname);
> + fprintf(outfp, "{\n");
> + fprintf(outfp, "\t.cpuid = \"%s\",\n", cpuid);
> + fprintf(outfp, "\t.version = \"%s\",\n", version);
> + fprintf(outfp, "\t.type = \"%s\",\n", type);

got build failure for make DEBUG=1:

CC pmu-events/jevents.o
pmu-events/jevents.c: In function ‘process_mapfile’:
pmu-events/jevents.c:498:10: error: ‘save’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
fprintf(outfp, "\t.type = \"%s\",\n", type);
^

jirka


\
 
 \ /
  Last update: 2015-06-03 13:01    [W:0.132 / U:1.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site