Removed dead code
If `emesg` is `Qundef`, it is not a message string and then `elen` (the length of the message) is 0. So `emesg` cannot be `Qundef` in the `elen != 0` block. Pointed out by Coverity Scan.
This commit is contained in:
parent
de0f192444
commit
5e0d27a32f
@ -169,9 +169,10 @@ print_errinfo(const VALUE eclass, const VALUE errat, const VALUE emesg, const VA
|
|||||||
write_warn(str, "\n");
|
write_warn(str, "\n");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
/* emesg is a String instance */
|
||||||
const char *tail = 0;
|
const char *tail = 0;
|
||||||
|
|
||||||
if (emesg == Qundef && highlight) write_warn(str, bold);
|
if (highlight) write_warn(str, bold);
|
||||||
if (RSTRING_PTR(epath)[0] == '#')
|
if (RSTRING_PTR(epath)[0] == '#')
|
||||||
epath = 0;
|
epath = 0;
|
||||||
if ((tail = memchr(einfo, '\n', elen)) != 0) {
|
if ((tail = memchr(einfo, '\n', elen)) != 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user