lasselukkari / aWOT

Arduino web server library.
MIT License
283 stars 41 forks source link

A warning... #99

Closed icepie closed 3 years ago

icepie commented 3 years ago
In file included from .pio\libdeps\nodemcuv2\aWOT\src\aWOT.cpp:23:0:
.pio\libdeps\nodemcuv2\aWOT\src\aWOT.cpp: In member function 'void Response::set(const char*, const char*)':
.pio\libdeps\nodemcuv2\aWOT\src\aWOT.h:72:52: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define SIZE(array) (sizeof(array) / sizeof(*array))
                                                    ^
.pio\libdeps\nodemcuv2\aWOT\src\aWOT.cpp:104:25: note: in expansion of macro 'SIZE'
   if (m_headersCount >= SIZE(m_headers)) {

I hope it can be fixed, thanks!

lasselukkari commented 3 years ago

The SIZE macro can be removed. It is not really needed as the array lengths are defined with macros anyway. I will take care of this tomorrow.