Replace # warnings with custom warnings.