Fix various compiler warnings throughout the code

Mostly signed/unsigned and typecasting issues

Taken from http://sourceforge.net/tracker/index.php?func=detail&aid=1811517&group_id=68956&atid=522957
diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index 62a37f2..60a4f80 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -124,7 +124,7 @@
 
 int encaps_printf(void *p, void *packet, unsigned len)
 {
-  int i;
+  unsigned int i;
   if (debug) {
     printf("The packet looks like this:\n");
     for( i=0; i<len; i++) {
@@ -423,7 +423,7 @@
   }
   apn.l = strlen(args_info.apn_arg) + 1;
   apn.v[0] = (char) strlen(args_info.apn_arg);
-  strncpy(&apn.v[1], args_info.apn_arg, sizeof(apn.v)-1);
+  strncpy((char *) &apn.v[1], args_info.apn_arg, sizeof(apn.v)-1);
 
 
   /* foreground                                                   */