[fixed] src/login/login_auth.cpp

Post Reply
altalus
Posts: 136
Joined: Wed Nov 14, 2012 8:31 pm
Location: Montreal Qc, CAN

[fixed] src/login/login_auth.cpp

Post by altalus » Thu Apr 23, 2015 10:23 am

Code: Select all

g++ -std=gnu++0x -DHAVE_CONFIG_H -I. -I./src/common      -DdsTCPSERV   -I/usr//include/luajit-2.0   -I/usr/include/mysql -DBIG_JOINS=1  -fno-strict-aliasing   -g -DNDEBUG  -g -O2 -MT dsconnect-login_auth.o -MD -MP -MF .deps/dsconnect-login_auth.Tpo -c -o dsconnect-login_auth.o `test -f 'src/login/login_auth.cpp' || echo './'`src/login/login_auth.cpp
src/login/login_auth.cpp: In function 'int32 login_parse(int32)':
src/login/login_auth.cpp:227:22: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
     char *fmtQuery = "SELECT max(accounts.id) FROM accounts;";
                      ^
src/login/login_auth.cpp:254:14: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
     fmtQuery = "INSERT INTO accounts(id,login,password,timecreate,timelastmodify,status,priv)\
              ^
src/login/login_auth.cpp:258:49: error: cannot pass objects of non-trivially-copyable type 'std::string {aka class std::basic_string<char>}' through '...'
          strtimecreate,ACCST_NORMAL,ACCPRIV_USER) == SQL_ERROR )
                                                 ^
make: *** [dsconnect-login_auth.o] Error 1
Sounds like changes to the new password string approach but I could be wrong on this one.
Last edited by altalus on Fri Apr 24, 2015 7:32 am, edited 1 time in total.

User avatar
kjLotus
Lead Developer
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: src/login/login_auth.cpp - string compile error on Linux

Post by kjLotus » Thu Apr 23, 2015 6:58 pm

https://github.com/DarkstarProject/dark ... 25e6c62140

if you could post an issue on github next time instead, it makes things easier for me, thanks

altalus
Posts: 136
Joined: Wed Nov 14, 2012 8:31 pm
Location: Montreal Qc, CAN

Re: src/login/login_auth.cpp - string compile error on Linux

Post by altalus » Fri Apr 24, 2015 7:31 am

Indeed, next time it will be a github issue.

Thank you for the fix, appreciate it :)

Post Reply