]> Git Repo - linux.git/commit - tools/perf/util/srcline.c
perf tools: Fix build error due to zfree() cast
authorNamhyung Kim <[email protected]>
Thu, 9 Jan 2014 14:07:59 +0000 (23:07 +0900)
committerArnaldo Carvalho de Melo <[email protected]>
Wed, 15 Jan 2014 18:10:04 +0000 (15:10 -0300)
commit7d16c634233c411f54b89d0f1d51750dc85c5f7e
tree6e00bbe2f05188b5d87d33b2a4549a224a3c1a43
parenta6205a35ba2d56dcfb79b08cc11b8c7d549826aa
perf tools: Fix build error due to zfree() cast

It failed to build perf on my ubuntu 10.04 box (gcc 4.4.3):

    CC       util/strlist.o
  cc1: warnings being treated as errors
  util/strlist.c: In function ‘str_node__delete’:
  util/strlist.c:42: error: dereferencing type-punned pointer will break strict-aliasing rules
  util/strlist.c:42: error: dereferencing type-punned pointer will break strict-aliasing rules
    CC       util/strfilter.o
  make: *** [util/strlist.o] Error 1

    CC       util/srcline.o
  cc1: warnings being treated as errors
  util/srcline.c: In function ‘addr2line_init’:
  util/srcline.c:132: error: dereferencing type-punned pointer will break strict-aliasing rules
  util/srcline.c:132: error: dereferencing type-punned pointer will break strict-aliasing rules
  util/srcline.c: In function ‘addr2line_cleanup’:
  util/srcline.c:143: error: dereferencing type-punned pointer will break strict-aliasing rules
  util/srcline.c:143: error: dereferencing type-punned pointer will break strict-aliasing rules
  make: *** [util/srcline.o] Error 1

It seems it only allows to remove 'const' qualifier.

Signed-off-by: Namhyung Kim <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/util/srcline.c
tools/perf/util/strlist.c
This page took 0.044765 seconds and 4 git commands to generate.