Skip to content

Commit

Permalink
cc: Fix compile warning (iovisor#2346)
Browse files Browse the repository at this point in the history
Add corresponding ifdef macro to get ride of the follow warning.

/home/lecopzer/workspace/mybcc/src/cc/bcc_debug.cc: In member function ‘void ebpf::SourceDebugger::dump()’:
/home/lecopzer/workspace/mybcc/src/cc/bcc_debug.cc:186:16: warning: unused variable ‘SectionID’ [-Wunused-variable]
       unsigned SectionID = get<2>(section.second);
                ^~~~~~~~~
  • Loading branch information
lecopzer authored and yonghong-song committed May 10, 2019
1 parent a2e71a9 commit e86e064
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cc/bcc_debug.cc
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ void SourceDebugger::dump() {
uint64_t Size;
uint8_t *FuncStart = get<0>(section.second);
uint64_t FuncSize = get<1>(section.second);
#if LLVM_MAJOR_VERSION >= 9
unsigned SectionID = get<2>(section.second);
#endif
ArrayRef<uint8_t> Data(FuncStart, FuncSize);
uint32_t CurrentSrcLine = 0;
string func_name = section.first.substr(fn_prefix_.size());
Expand Down

0 comments on commit e86e064

Please sign in to comment.