commit - d089c3673c062bc918fd8fedb82b992855965ec6
commit + 756050ac401f1e724f0c1fd97af4a9855589c703
blob - 9dcd5b85b181ee63d76a75bf16c9ae0dc46aaa26
blob + 1d0c10d78dbadca30895a068e7909856805f6496
--- 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 - d401d4ed9c42375d81a4e41c59a8657a274eb281
blob + dbbf1df2ebec072333fd1aaef08fac6a2f818de9
--- 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 - 30401fee605c3b7937f25d1f3c8f216c945c9525
blob + 1400f75cd82a62af84447ebaeee062b963f74f31
--- 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;
}