[PATCH 3/3] Correct a conditional check for ff_linenr_info

William Cohen <[email protected]>
Newsgroups gmane.linux.oprofile
Message-ID <[email protected]>
The GCC 7 compiler pointed out that the enum value ff_linenr_info was
being checked as a boolean by itself.  The ff_linenr_info enum is a
bit flag used to check whether a particular bit in the flags variable
is set.  This conditional was corrected to match other uses of
ff_linenr_info in format_output.cpp.

Signed-off-by: William Cohen <[email protected]>
---
 libpp/format_output.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libpp/format_output.cpp b/libpp/format_output.cpp
index 11cd396..a36128f 100644
--- a/libpp/format_output.cpp
+++ b/libpp/format_output.cpp
@@ -793,7 +793,7 @@ output_symbol_details(symbol_entry const * symb,
 			field_datum datum(*symb, it->second, 0, c, 
 					  extra_found_images, 0.0);
 			output_attribute(str, datum, ff_vma, VMA);
-			if (ff_linenr_info) {
+			if (flags & ff_linenr_info) {
 				string sym_file;
 				size_t sym_line;
 				string samp_file;
-- 
2.9.3


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.