hi ssinfod,
1. according to Codewarrior compiler manual : This pragma (as other pragmas) has to be specified outside of the function's scope. For example, it is not possible to change a message inside a function or for a part of a function.

pls be aware of this point.
2. use '#pragma MESSAGE DEFAULT C5909 " or "#pragma MESSAGE WARNING" to enable it again.
I attached my demo code, it's for C1420 but the method is the same for C5909.
can this help?
Have a great day,
Zhang Jun
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------