Fix warnings reported by -Wpedantic

Previously CI hasn't been running with -Wpedantic (using autoconf), so
these haven't been reported previously.

- replace BUILD_ASSERT with static_assert()
- don't use %m GNU extension for printf
- don't use arithmetic on void*
- remove unused variables

Change-Id: I97d1acc908f06773b8b1ee95bfee80760fdc7a63
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
diff --git a/utils/mctp-capture.c b/utils/mctp-capture.c
index b38e92d..ea83146 100644
--- a/utils/mctp-capture.c
+++ b/utils/mctp-capture.c
@@ -30,8 +30,6 @@
 
 int capture_prepare(struct capture *cap)
 {
-	int rc;
-
 	if (!(cap->pcap = pcap_open_dead(CAPTURE_LINKTYPE_LINUX_SLL2,
 					 UINT16_MAX))) {
 		fprintf(stderr, "pcap_open_dead: failed\n");
@@ -135,7 +133,7 @@
 
 	/* Ignore the eid at start of buf */
 	memcpy(pktbuf + sizeof(struct sll2_header) + sizeof(struct mctp_hdr),
-	       buf + 1, len - 1);
+	       (const uint8_t *)buf + 1, len - 1);
 
 	hdr.caplen = size;
 	hdr.len = size;