eddic / fastcgipp

fastcgi++: A C++ FastCGI and Web development platform:
https://fastcgipp.isatec.ca
GNU Lesser General Public License v3.0
310 stars 94 forks source link

Error with sign-compare on mailer.cpp make #83

Closed AndrewPentri closed 4 years ago

AndrewPentri commented 4 years ago

Hello there. I've got this error-logs on make command:

/home/pi/repos/kontakts./backend/fastcgi-server/fastcgi++/src/mailer.cpp: In member function ‘void Fastcgipp::Mail::Mailer::handler()’: /home/pi/repos/kontakts./backend/fastcgi-server/fastcgi++/src/mailer.cpp:96:37: error: comparison of integer expressions of different signedness: ‘ssize_t’ {aka ‘int’} and ‘unsigned int’ [-Werror=sign-compare]

                         if(m_socket.write(m_line.data(), m_line.size())
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                 != static_cast<unsigned>(m_line.size()))
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/home/pi/repos/kontakts./backend/fastcgi-server/fastcgi++/src/mailer.cpp:155:41: error: comparison of integer expressions of different signedness: ‘ssize_t’ {aka ‘int’} and ‘unsigned int’ [-Werror=sign-compare]

                             if(m_socket.write(m_line.data(), m_line.size())
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                     != static_cast<unsigned>(m_line.size()))
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/home/pi/repos/kontakts./backend/fastcgi-server/fastcgi++/src/mailer.cpp:186:37: error: comparison of integer expressions of different signedness: ‘ssize_t’ {aka ‘int’} and ‘unsigned int’ [-Werror=sign-compare]

                         if(m_socket.write(m_line.data(), m_line.size())
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                 != static_cast<unsigned>(m_line.size()))
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/home/pi/repos/kontakts./backend/fastcgi-server/fastcgi++/src/mailer.cpp:240:57: error: comparison of integer expressions of different signedness: ‘ssize_t’ {aka ‘int’} and ‘const unsigned int’ [-Werror=sign-compare]

                             if(m_socket.write(
                                ~~~~~~~~~~~~~~~       
                                         chunk.data.get(),
                                         ~~~~~~~~~~~~~~~~~
                                         chunk.size) != chunk.size)
eddic commented 4 years ago

Should be fixed with this.