commit - 61702ba622605efc0e731fd785b617714607e1ee
commit + 60b94e7d2a2d0fd6dc815d562ee11ba673819a7c
blob - 7f782dfab8e87a8c8c568f8f7e3c6459d964829d
blob + 3f63bba02d14c1e32cb7499541ea9aa5c0dc9081
--- include/got_error.h
+++ include/got_error.h
* 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
#include <errno.h>
#include <stdint.h>
+#include <imsg.h>
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
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) {
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
#include <sys/time.h>
#include <sys/mman.h>
+#include <inttypes.h>
#include <limits.h>
#include <signal.h>
#include <stdint.h>
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;
}