[db] Fix compile warnings in db.c

For the compiler classmark1 is a struct and the compiler is
unaware that it fits into an unsigned int. Use memcpy to
copy it to a u_int8_t (the compiler should inline this).

dbi_conn_quote_binary_copy works on unsigned char* change
q_apdu to be unsigned char.
diff --git a/openbsc/src/db.c b/openbsc/src/db.c
index 270d4d9..b86348c 100644
--- a/openbsc/src/db.c
+++ b/openbsc/src/db.c
@@ -439,9 +439,11 @@
 {
 	dbi_result result;
 	unsigned char *cm2, *cm3;
+	u_int8_t classmark1;
 
+	memcpy(&classmark1, &equip->classmark1, sizeof(classmark1));
 	printf("DB: Sync Equipment IMEI=%s, classmark1=%02x",
-		equip->imei, equip->classmark1);
+		equip->imei, classmark1);
 	if (equip->classmark2_len)
  		printf(", classmark2=%s",
 			hexdump(equip->classmark2, equip->classmark2_len));
@@ -462,7 +464,7 @@
 			"classmark2 = %s, "
 			"classmark3 = %s "
 		"WHERE imei = '%s' ",
-		equip->classmark1, cm2, cm3, equip->imei);
+		classmark1, cm2, cm3, equip->imei);
 
 	free(cm2);
 	free(cm3);
@@ -853,7 +855,7 @@
 			u_int8_t *apdu)
 {
 	dbi_result result;
-	char *q_apdu;
+	unsigned char *q_apdu;
 
 	dbi_conn_quote_binary_copy(conn, apdu, len, &q_apdu);