]> sourceware.org Git - systemtap.git/commit
sdt_query: initialize probe_type/loc as unknown.
authorJosh Stone <jistone@redhat.com>
Thu, 12 Apr 2012 19:51:24 +0000 (12:51 -0700)
committerJosh Stone <jistone@redhat.com>
Thu, 12 Apr 2012 21:32:28 +0000 (14:32 -0700)
commitd61ea6024b0a465f786b11122c5bc73a11f84a93
tree479e9906c1fc2e457f4723f2cf404b25ce55e7af
parent1af73aa2e762248bd9bb66f64fbb7fc814b2d5f5
sdt_query: initialize probe_type/loc as unknown.

The fields, probe_type and probe_loc, are meaningless to start, and are
later set as the queried module is examined.  Commit 74fe61bc tried to
make sure that all POD types in this class are initialized, but these
two were essentially self-assigned.  Gcc misses this uninitialized use,
but clang caught it:

  CXX    stap-tapsets.o
../tapsets.cxx:6058:38: error: field is uninitialized when used here [-Werror,-Wuninitialized]
  base_query(dw, params), probe_type(probe_type), probe_loc(probe_loc), base_probe(base_probe),
                                     ^
../tapsets.cxx:6058:61: error: field is uninitialized when used here [-Werror,-Wuninitialized]
  base_query(dw, params), probe_type(probe_type), probe_loc(probe_loc), base_probe(base_probe),
                                                            ^

Values for "unknown" are now added to these enum types to initialize
with, and dealt with where needed.
sdt_types.h
tapsets.cxx
This page took 0.026977 seconds and 5 git commands to generate.