Commit Diff


commit - 61702ba622605efc0e731fd785b617714607e1ee
commit + 60b94e7d2a2d0fd6dc815d562ee11ba673819a7c
blob - 7f782dfab8e87a8c8c568f8f7e3c6459d964829d
blob + 3f63bba02d14c1e32cb7499541ea9aa5c0dc9081
--- include/got_error.h
+++ include/got_error.h
@@ -267,7 +267,8 @@ const struct got_error *got_error_path(const char *, i
  * from the provided format string and the variable-length list of
  * additional arguments.
 */
-const struct got_error *got_error_fmt(int, const char *, ...);
+const struct got_error *got_error_fmt(int, const char *, ...)
+	__attribute__((__format__ (printf, 2, 3)));
 
 /*
  * Check whether open(2) with O_NOFOLLOW failed on a symlink.
blob - f7d23f876f92b546a95aaf832e5265e12021f2cd
blob + b083b876a64883cb13df55214f9b111eda8939c5
--- lib/pack_create.c
+++ lib/pack_create.c
@@ -24,6 +24,8 @@
 
 #include <errno.h>
 #include <stdint.h>
+#include <imsg.h>
+#include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -1372,7 +1374,7 @@ recv_painted_commit(void *arg, struct got_object_id *i
 	default:
 		/* should not happen */
 		return got_error_fmt(GOT_ERR_NOT_IMPL,
-		    "%s invalid commit color %d", __func__, color);
+		    "%s invalid commit color %"PRIdPTR, __func__, color);
 	}
 
 	STAILQ_FOREACH_SAFE(qid, a->ids, entry, tmp) {
@@ -1616,7 +1618,8 @@ paint_commits(int *ncolored, struct got_object_id_queu
 		default:
 			/* should not happen */
 			err = got_error_fmt(GOT_ERR_NOT_IMPL,
-			    "%s invalid commit color %d", __func__, color);
+			    "%s invalid commit color %"PRIdPTR, __func__,
+			    color);
 			goto done;
 		}
 
blob - 030ab7bc796262b8731da91f043600439994888b
blob + a7926468d37341ec3abda1461278f7fbf74f205e
--- libexec/got-read-pack/got-read-pack.c
+++ libexec/got-read-pack/got-read-pack.c
@@ -21,6 +21,7 @@
 #include <sys/time.h>
 #include <sys/mman.h>
 
+#include <inttypes.h>
 #include <limits.h>
 #include <signal.h>
 #include <stdint.h>
@@ -1663,7 +1664,8 @@ paint_commits(struct got_object_id_queue *ids, int *ni
 		default:
 			/* should not happen */
 			err = got_error_fmt(GOT_ERR_NOT_IMPL,
-			    "%s invalid commit color %d", __func__, color);
+			    "%s invalid commit color %"PRIdPTR, __func__,
+			    color);
 			goto done;
 		}