In file included from main.cpp:17:0:
figure.h: In function 'std::shared_ptr<Figure> CreateFigure(std::istringstream&)':
figure.h:74:17: error: comparison with string literal results in unspecified behavior [-Werror=address]
if (figure_t == "RECT") {
^~~~~~
figure.h:78:17: error: comparison with string literal results in unspecified behavior [-Werror=address]
if (figure_t == "TRIANGLE") {
^~~~~~~~~~
figure.h:82:17: error: comparison with string literal results in unspecified behavior [-Werror=address]
if (figure_t == "CIRCLE") {
^~~~~~~~
figure.h:86:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
figure.h:73:4: error: 'figure_t' is used uninitialized in this function [-Werror=uninitialized]
is >> figure_t;
~~~^~~~~~~~~~~
cc1plus: all warnings being treated as errors
|