Unsequenced function calls: error for a #define

271 Views Asked by At

A static code analysis tool shows me that I have an unsequenced function calls for a define. Want to get rid of the warning.

It complains that I use Logging() and get_id() (two functions, only one allowed) in the last define.

#define MSG_FORMAT(x) " [thread: " << std::this_thread::get_id() << "] [" << __func__ << "] " << x

#define SYSTEM_LOG(x) loa::peer::Logging() << MSG_FORMAT(x)

How can I modify the defines to avoid the warning? As you see I have already tried to split them into two defines.

0

There are 0 best solutions below