There's two ways to do it in C++, very similar to the Octave language itself.
disable_warning (const std::string& id);
set_warning_state (const std::string &id, const std::string &state);
Actually, disable_warning
is just wrapper around the second option set_warning_state (id, "off")
. Take a look into the error.cc for more options related to this. I'm sure you can figure out yourself how to turn the warning back on at the end ;)