/pidgin/main: 53109a1846ae: MXit: Fix compiler warnings related ...
Andrew Victor
andrew.victor at mxit.com
Tue Apr 2 18:56:47 EDT 2013
Changeset: 53109a1846ae70660ec2acbc188f02e3ade37396
Author: Andrew Victor <andrew.victor at mxit.com>
Date: 2013-04-03 00:49 +0200
Branch: release-2.x.y
URL: https://hg.pidgin.im/pidgin/main/rev/53109a1846ae
Description:
MXit: Fix compiler warnings related to "comparison between signed and unsigned integer expressions".
cipher.c:131:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
cipher.c:179:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
cipher.c:230:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
markup.c:295:45: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
markup.c:298:45: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
markup.c:660:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
roster.c:678:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
diffstat:
libpurple/protocols/mxit/cipher.c | 32 ++++++++++++++++----------------
libpurple/protocols/mxit/markup.c | 14 +++++++-------
libpurple/protocols/mxit/roster.c | 2 +-
3 files changed, 24 insertions(+), 24 deletions(-)
diffs (99 lines):
diff --git a/libpurple/protocols/mxit/cipher.c b/libpurple/protocols/mxit/cipher.c
--- a/libpurple/protocols/mxit/cipher.c
+++ b/libpurple/protocols/mxit/cipher.c
@@ -107,12 +107,12 @@ static char* transport_layer_key( struct
*/
char* mxit_encrypt_password( struct MXitSession* session )
{
- char key[16 + 1];
- char exkey[512];
- GString* pass = NULL;
- GString* encrypted = NULL;
- char* base64;
- int i;
+ char key[16 + 1];
+ char exkey[512];
+ GString* pass = NULL;
+ GString* encrypted = NULL;
+ char* base64;
+ unsigned int i;
purple_debug_info( MXIT_PLUGIN_ID, "mxit_encrypt_password\n" );
@@ -154,11 +154,11 @@ char* mxit_encrypt_password( struct MXit
*/
char* mxit_decrypt_message( struct MXitSession* session, char* message )
{
- guchar* raw_message;
- gsize raw_len;
- char exkey[512];
- GString* decoded = NULL;
- int i;
+ guchar* raw_message;
+ gsize raw_len;
+ char exkey[512];
+ GString* decoded = NULL;
+ unsigned int i;
/* remove optional header: <mxitencrypted ver="5.2"/> */
if ( strncmp( message, ENCRYPT_HEADER, strlen( ENCRYPT_HEADER ) ) == 0 )
@@ -209,11 +209,11 @@ char* mxit_decrypt_message( struct MXitS
*/
char* mxit_encrypt_message( struct MXitSession* session, char* message )
{
- GString* raw_message = NULL;
- char exkey[512];
- GString* encoded = NULL;
- gchar* base64;
- int i;
+ GString* raw_message = NULL;
+ char exkey[512];
+ GString* encoded = NULL;
+ gchar* base64;
+ unsigned int i;
purple_debug_info( MXIT_PLUGIN_ID, "encrypt message: '%s'\n", message );
diff --git a/libpurple/protocols/mxit/markup.c b/libpurple/protocols/mxit/markup.c
--- a/libpurple/protocols/mxit/markup.c
+++ b/libpurple/protocols/mxit/markup.c
@@ -249,12 +249,12 @@ static void mxit_show_split_message( str
{
GString* msg = NULL;
char* ch = NULL;
- int pos = 0;
- int start = 0;
- int l_nl = 0;
- int l_sp = 0;
- int l_gt = 0;
- int stop = 0;
+ unsigned int pos = 0;
+ unsigned int start = 0;
+ unsigned int l_nl = 0;
+ unsigned int l_sp = 0;
+ unsigned int l_gt = 0;
+ unsigned int stop = 0;
int tags = 0;
gboolean intag = FALSE;
@@ -651,7 +651,7 @@ static void emoticon_request( struct RXM
*/
static int mxit_parse_vibe( struct RXMsgData* mx, const char* message )
{
- int vibeid;
+ unsigned int vibeid;
vibeid = message[2] - '0';
diff --git a/libpurple/protocols/mxit/roster.c b/libpurple/protocols/mxit/roster.c
--- a/libpurple/protocols/mxit/roster.c
+++ b/libpurple/protocols/mxit/roster.c
@@ -672,7 +672,7 @@ struct contact* get_mxit_invite_contact(
{
struct contact* con = NULL;
struct contact* match = NULL;
- int i;
+ unsigned int i;
/* run through all the invites and try and find the match */
for ( i = 0; i < g_list_length( session->invites ); i++ ) {
More information about the Commits
mailing list