Hello Teg,

Dooh

strcpy(result->>ip_address,(const char*)pszData);

Is what I meant.

C


Friday, October 10, 2008, 1:04:08 PM, you wrote:

T> Hello Shaun,

T> In my mind, that's a crash waiting to happen.

T> It returns an unsigned char* and strcpy wants a signed one
T> const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);


T>         const unsigned char* pszData =
T> sqlite3_column_text(m_pStatement,static_cast<int>(nCol));
T>         if( !pszData )
T>         {
T>                 return(E_ABORT);
T>         }
T>         strcpy(result->>ip_address,(const
T> char*)sqlite3_column_text(plineInfo, 2));

T> I'd check the return value before I used it.  I didn't test the cast
T> so, you might need to tweek it. I actually do a UTF8 translation after
T> I get the text back.
T>         
T> C

T> Friday, October 10, 2008, 12:25:45 PM, you wrote:

SR>> I'm getting this warning when doing the following

SR>> warning: pointer targets in passing argument 2 of 'strcpy' differ in 
SR>> signedness

strcpy(result->>>ip_address,sqlite3_column_text(plineInfo, 2));

result->>>ip_address is from struct result { char ip_address[17]; };

SR>> Anybody know what needs to be done here.

SR>> ~Shaun 


SR>> _______________________________________________
SR>> sqlite-users mailing list
SR>> [email protected]
SR>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users






-- 
Best regards,
 Teg                            mailto:[EMAIL PROTECTED]

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to