Tencent / rapidjson

A fast JSON parser/generator for C++ with both SAX/DOM style API
http://rapidjson.org/
Other
14.24k stars 3.54k forks source link

Warning - No return, in function returning non-void #448

Closed etiennebatise closed 9 years ago

etiennebatise commented 9 years ago

Hi,

I've found 4 new warnings int encodedstream.h

The line number can change with new versions so here is the first item for example :

Ch Peek() const { RAPIDJSON_ASSERT(false); }

So maybe just adding return 0; before the closing brace will solve this, but the comment //Not implemented leaves me wondering about this one.

miloyip commented 9 years ago

Yes. Adding return 0 should be fine. It is // Not implemented because these streams does not support insitu-parsing but insitu-parsing is enabled by a template parameter. So it still needs to be exists for passing compilation but should never be called.