JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.
If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.
If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.
| CodeSonar® 9.2p0 | CONFIDENTIAL | CodeSecure Inc |
Control is transferred into a catch block using a goto or switch statement.
Code that triggers a warning of this class will trigger further warnings, if the relevant classes are enabled.
See also Branch Into Try Block.
This warning class is derived from a C/C++ parser warning.
| Class Name | Branch Into Handler | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Significance | style | |||||||||||||||||||||
| Mnemonic | PARSE.BIH | |||||||||||||||||||||
| Categories |
|
|||||||||||||||||||||
| Availability | Available for C++ only (not C). |
|||||||||||||||||||||
| Enabling | Checks for this warning class are enabled by default.
However, warning instances of this class that are issued as parser
errors (rather than parser warnings)
will be discarded
when using factory configuration settings.
To prevent these instances from being discarded, add the
following WARNING_FILTER rule to the project configuration file.
WARNING_FILTER += allow class="Branch Into Handler" WARNING_FILTER += discard class="Branch Into Handler" |
void clean_up(void);
void do_action(void);
void parse_bih (int i) {
if (i>0) {
goto Label_in_try; // ('Branch Into try Block', 'Goto Statement', and
// 'Label Not In Enclosing Block' warnings issued here)
}
if (i<0) {
goto Label_in_catch; // 'Branch Into Handler' warning issued here
// ('Goto Statement' and 'Label Not In Enclosing Block' warnings also issued)
}
try {
Label_in_try:
do_action();
}
catch (...){ // ('Use of catch' warning issued here)
Label_in_catch:
clean_up();
}
}
The following configuration file parameters affect checks for this warning class.
To report problems with this documentation, please visit https://support.codesecure.com/.