我通过以下方式看到某处断言与消息一起使用:
assert(("message", condition));
这似乎很有效,除了gcc抛出以下警告:
warning: left-hand operand of comma expression has no effect
我怎么能停止警告?
c gcc assert compiler-warnings
assert ×1
c ×1
compiler-warnings ×1
gcc ×1