Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around spurious GCC warning in P4RuntimeSymbolTable::piResourceType() #567

Merged

Conversation

sethfowler
Copy link
Contributor

GCC warns that P4RuntimeSymbol::piResourceType() may fail to return a value on all code paths, which is not true - the switch block is exhaustive. (As clang correctly recognizes.) This PR adds a BUG statement to make GCC happy.

@sethfowler sethfowler self-assigned this May 4, 2017
@sethfowler sethfowler requested a review from antoninbas May 4, 2017 20:19
@sethfowler sethfowler force-pushed the seth/silence-warning-in-piresourcetype branch from c56ba67 to 6f583d4 Compare May 4, 2017 22:31
@sethfowler sethfowler merged commit 88d6ecf into p4lang:master May 4, 2017
@sethfowler sethfowler deleted the seth/silence-warning-in-piresourcetype branch May 4, 2017 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants