-
Bug
-
Resolution: Fixed
-
P4
-
11
-
b06
The compiler is free to elide this test, since (this == NULL) can never be true; applying an ordinary member function to NULL invokes undefined behavior. This function needs to be changed.
char* Metadata::print_value_string() const {
char buf[256];
stringStream st(buf, sizeof(buf));
if (this == NULL) {
st.print("NULL");
} else {
print_value_on(&st);
}
return st.as_string();
}
char* Metadata::print_value_string() const {
char buf[256];
stringStream st(buf, sizeof(buf));
if (this == NULL) {
st.print("NULL");
} else {
print_value_on(&st);
}
return st.as_string();
}