我坚信你用的是GCC(因为我用的GCC也有这条错误信息)!第一眼看见[-Wxxx]就认出来了 比如:std::printf(""); // 字符串长度为空。又或者:const char* const p = "";std::printf(p);而且,你的编译设置是很比较严格的,用了-Wall (但我的更严格)还有的就是,现在GCC都有中文版的了...
http://stackoverflow.com/questions/9926674/why-does-gcc-wall-give-warning-about-zero-length-format-string Steps to reproduce: cmake ../mangos -DCMAKE_INSTALL_PREFIX=$PWD/mangos/run -DPCH=1 -DDEBUG=0 Client version: N/A Commit hash: 623a244bf60920d1a4534eb1553f44d657f4b251 ...
Maybe a string operation were you request a part of the string and you defined length negative!Just do what the messages says: Check the stack trace. Launch the program in the debugger and see what happens. Usually you should see the wrong code line somewhere in the callstack....