Skip to content

Commit

Permalink
Properly handle SL_UNIQUE in switch statements
Browse files Browse the repository at this point in the history
e.g.
/home/peter/dyninst/symtabAPI/src/Object.C:97:20: warning: enumeration
value ‘SL_UNIQUE’ not handled in switch [-Wswitch]
/home/peter/dyninst/symtabAPI/src/Symtab.C:3465:11: warning: enumeration
value ‘SL_UNIQUE’ not handled in switch [-Wswitch]
  • Loading branch information
pefoley2 committed Oct 30, 2016
1 parent 998b028 commit 859cb77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions symtabAPI/src/Object.C
Expand Up @@ -99,6 +99,7 @@ void print_symbols( std::vector< Symbol *>& allsymbols ) {
case Symbol::SL_GLOBAL: fprintf(fd, " GL"); break;
case Symbol::SL_LOCAL: fprintf(fd, " LO"); break;
case Symbol::SL_WEAK: fprintf(fd, " WK"); break;
case Symbol::SL_UNIQUE: fprintf(fd, " UQ"); break;
}
switch (sym->getVisibility()) {
case Symbol::SV_UNKNOWN: fprintf(fd, " ???"); break;
Expand Down
1 change: 1 addition & 0 deletions symtabAPI/src/Symtab.C
Expand Up @@ -3468,6 +3468,7 @@ const char *Symbol::symbolLinkage2Str(SymbolLinkage t)
CASE_RETURN_STR(SL_GLOBAL);
CASE_RETURN_STR(SL_LOCAL);
CASE_RETURN_STR(SL_WEAK);
CASE_RETURN_STR(SL_UNIQUE);
};

return "invalid symbol linkage";
Expand Down

0 comments on commit 859cb77

Please sign in to comment.