Index: /pjproject/trunk/pjlib-util/src/pjlib-util/md5.c
===================================================================
--- /pjproject/trunk/pjlib-util/src/pjlib-util/md5.c	(revision 5543)
+++ /pjproject/trunk/pjlib-util/src/pjlib-util/md5.c	(revision 5544)
@@ -152,6 +152,8 @@
 
     /* Append length in bits and transform */
-    ((pj_uint32_t *) ctx->in)[14] = ctx->bits[0];
-    ((pj_uint32_t *) ctx->in)[15] = ctx->bits[1];
+    //((pj_uint32_t *) ctx->in)[14] = ctx->bits[0];
+    //((pj_uint32_t *) ctx->in)[15] = ctx->bits[1];
+    pj_memcpy(&ctx->in[14 << 2], &ctx->bits[0], sizeof(ctx->bits[0]));
+    pj_memcpy(&ctx->in[15 << 2], &ctx->bits[1], sizeof(ctx->bits[1]));
 
     MD5Transform(ctx->buf, (pj_uint32_t *) ctx->in);
Index: /pjproject/trunk/pjlib/src/pj/sock_bsd.c
===================================================================
--- /pjproject/trunk/pjlib/src/pj/sock_bsd.c	(revision 5543)
+++ /pjproject/trunk/pjlib/src/pj/sock_bsd.c	(revision 5544)
@@ -229,9 +229,10 @@
 PJ_DEF(char*) pj_inet_ntoa(pj_in_addr inaddr)
 {
-#if !defined(PJ_LINUX) && !defined(PJ_LINUX_KERNEL)
+#if 0 //!defined(PJ_LINUX) && !defined(PJ_LINUX_KERNEL)
     return inet_ntoa(*(struct in_addr*)&inaddr);
 #else
     struct in_addr addr;
-    addr.s_addr = inaddr.s_addr;
+    //addr.s_addr = inaddr.s_addr;
+    pj_memcpy(&addr, &inaddr, sizeof(addr));
     return inet_ntoa(addr);
 #endif
Index: /pjproject/trunk/pjlib/src/pj/ssl_sock_ossl.c
===================================================================
--- /pjproject/trunk/pjlib/src/pj/ssl_sock_ossl.c	(revision 5543)
+++ /pjproject/trunk/pjlib/src/pj/ssl_sock_ossl.c	(revision 5544)
@@ -1322,6 +1322,6 @@
                     break;
                 case GEN_IPADD:
-		    p = ASN1_STRING_data(name->d.ip);
-		    len = ASN1_STRING_length(name->d.ip);
+		    p = (unsigned char*)M_ASN1_STRING_data(name->d.ip);
+		    len = M_ASN1_STRING_length(name->d.ip);
 		    type = PJ_SSL_CERT_NAME_IP;
                     break;
Index: /pjproject/trunk/pjmedia/src/pjmedia-audiodev/android_jni_dev.c
===================================================================
--- /pjproject/trunk/pjmedia/src/pjmedia-audiodev/android_jni_dev.c	(revision 5543)
+++ /pjproject/trunk/pjmedia/src/pjmedia-audiodev/android_jni_dev.c	(revision 5544)
@@ -545,5 +545,5 @@
     pj_status_t status = PJ_SUCCESS;
     int state = 0;
-    int buffSize, inputBuffSizePlay, inputBuffSizeRec;
+    int buffSize, inputBuffSizePlay = 0, inputBuffSizeRec = 0;
     int channelInCfg, channelOutCfg, sampleFormat;
     jmethodID constructor_method=0, bufsize_method = 0;
@@ -932,5 +932,5 @@
         if (stream->track) {
             jmethodID vol_method = 0;
-            int retval;
+            int retval = 0;
             float vol = *(int *)value;
             
Index: /pjproject/trunk/pjmedia/src/pjmedia-videodev/android_dev.c
===================================================================
--- /pjproject/trunk/pjmedia/src/pjmedia-videodev/android_dev.c	(revision 5543)
+++ /pjproject/trunk/pjmedia/src/pjmedia-videodev/android_dev.c	(revision 5544)
@@ -751,5 +751,5 @@
     const pjmedia_video_format_info *vfi;
     pjmedia_video_apply_fmt_param vafp;
-    pj_uint32_t and_fmt;
+    pj_uint32_t and_fmt = 0;
     unsigned convert_to_i420 = 0;
     pj_status_t status = PJ_SUCCESS;
@@ -1108,10 +1108,10 @@
 			       jlong user_data)
 {
-    and_stream *strm = *(and_stream**)&user_data;
+    and_stream *strm = (and_stream*)(intptr_t)user_data;
     pjmedia_frame f;
     pj_uint8_t *Y, *U, *V;
     pj_status_t status; 
-    void *frame_buf, *data_buf;     
-
+    void *frame_buf, *data_buf;
+    
     strm->frame_ts.u64 += strm->ts_inc;
     if (!strm->vid_cb.capture_cb)
Index: /pjproject/trunk/pjmedia/src/pjmedia/avi_player.c
===================================================================
--- /pjproject/trunk/pjmedia/src/pjmedia/avi_player.c	(revision 5543)
+++ /pjproject/trunk/pjmedia/src/pjmedia/avi_player.c	(revision 5544)
@@ -45,5 +45,7 @@
 #define AVI_EOF 0xFFEEFFEE
 
-#define COMPARE_TAG(doc_tag, tag) (doc_tag == *((pj_uint32_t *)avi_tags[tag]))
+//#define COMPARE_TAG(doc_tag, tag) (doc_tag==*((pj_uint32_t*)avi_tags[tag]))
+#define COMPARE_TAG(doc_tag, tag) \
+	    (pj_memcmp(&(doc_tag), &avi_tags[tag], 4)==0)
 
 #define SIGNATURE	    PJMEDIA_SIG_PORT_VID_AVI_PLAYER
Index: /pjproject/trunk/pjnath/src/pjnath/stun_msg_dump.c
===================================================================
--- /pjproject/trunk/pjnath/src/pjnath/stun_msg_dump.c	(revision 5543)
+++ /pjproject/trunk/pjnath/src/pjnath/stun_msg_dump.c	(revision 5544)
@@ -257,4 +257,5 @@
     int len;
     unsigned i;
+    pj_uint32_t tsx_id[3];
 
     PJ_ASSERT_RETURN(msg && buffer && length, NULL);
@@ -270,4 +271,5 @@
     APPLY();
 
+    pj_memcpy(tsx_id, msg->hdr.tsx_id, sizeof(msg->hdr.tsx_id));
     len = pj_ansi_snprintf(p, end-p, 
 			   " Hdr: length=%d, magic=%08x, tsx_id=%08x%08x%08x\n"
@@ -275,7 +277,7 @@
 			   msg->hdr.length,
 			   msg->hdr.magic,
-			   *(pj_uint32_t*)&msg->hdr.tsx_id[0],
-			   *(pj_uint32_t*)&msg->hdr.tsx_id[4],
-			   *(pj_uint32_t*)&msg->hdr.tsx_id[8]);
+			   tsx_id[0],
+			   tsx_id[1],
+			   tsx_id[2]);
     APPLY();
 
