Convert __attribute__((__format__(__printf__,x,y))) to __printflike(x,y),
except */dist, */contrib, and programs built as tools (usr.bin/make and
usr.bin/sed).
Convert __scanflike likewise.
#
#
# patch "bin/sh/output.h"
# from [56fa6d769f091474ee38729779f22140e465b4fb]
# to [763dfbc10b87084f2abedb9edbb8e262b3cbead5]
#
# patch "games/cribbage/cribbage.h"
# from [c709a9995a4cf7d5da9f3623d6ff169618fc48e8]
# to [6396cec86f5c0923826ec246e12fd2493442424f]
#
# patch "games/hack/extern.h"
# from [67e9c047497453525fb3a1a61ec15ee7e0bca9bd]
# to [14e233afdc949a291eac7099394a92c95b715128]
#
# patch "games/larn/extern.h"
# from [161f1b9cdb9429fe6265db4a51dab3a0032817ce]
# to [1a321711b6da7f5e115f092f119ea655b21f823d]
#
# patch "games/rogue/inventory.c"
# from [c301721ee10eb4dad65fc4810fd024f9459a7c9a]
# to [55e357bcb78653a7bdb98612b5286f7ffa3e0f2d]
#
# patch "games/rogue/rogue.h"
# from [8759f27e378e2114f48e3bfe501c19dcb694d49c]
# to [47120c6fab312b2f30fa5ebadf6d59e1f04ab712]
#
# patch "games/sail/extern.h"
# from [841d0799b3c2e57bb43f1a53ea7f6248a640d39d]
# to [0e3623c72d7e105861633b718f028a4f464d851c]
#
# patch "include/err.h"
# from [ea280165416597373bfed0abaee5f8fb8ff29964]
# to [123c26c1c74337be56c8faec215e14e9bd792c83]
#
# patch "include/ssp/stdio.h"
# from [f04b78bfb36242101ed610ff39e4855b8603ee04]
# to [54057084ff20fc619089a4ef19afa3043eb0d5a0]
#
# patch "include/stdio.h"
# from [2ab63d082e2bc417555a7bb654110f179005ddfc]
# to [e1ed71c8ba026736a184e601601d789e83b740f0]
#
# patch "include/stdlib.h"
# from [e353a0264cf9c0d96f929dda02849305c6e06f74]
# to [837aa2b2ca7a5f65a4b8d9b20c246c420d2e57d9]
#
# patch "include/util.h"
# from [1dbcfffcc223caa05c86374829a0151853bb27e3]
# to [a7107b2922127646f7003988d7c6f596f26a1f80]
#
# patch "lib/libc/include/extern.h"
# from [5f6f2edfb9d84bee0703e54c3a11a21000683bf2]
# to [91ff2f257fc05ffba1eea8bd7288e6e7e55b0f6e]
#
# patch "lib/libc/net/gethnamaddr.c"
# from [d18bf3e1313d5d96b28386b7ab8e9890a78841bb]
# to [5d7c9c327c833275d0f91884a4d89352c926abf0]
#
# patch "lib/libc/stdio/local.h"
# from [d78fa75243d73eda776b5e44b462a87c17aa9227]
# to [29dc71365a607f3522819d9df5845b6b485aeceb]
#
# patch "lib/libcurses/curses.h"
# from [2890c830b4b8817efcf3ae2714e0c275b63d5a69]
# to [bc6236aa153e83830d6cc6c4abc01d011b1b63a1]
#
# patch "lib/libcurses/curses_private.h"
# from [7ec24d53ca4a7c7d9ef299027b8ce87b1b444124]
# to [bee7bb35868de5609430872ab55130347abf29c0]
#
# patch "lib/libform/form.h"
# from [7f9745a4524de86374c96b53c33380b6ee8a157d]
# to [03f297bc82ec4159cb8041b08100bfa91b22ea68]
#
# patch "lib/libkvm/kvm_private.h"
# from [956822d766ad54261c18b6093a17d677f0c11e8b]
# to [7b3040f8c286a3185c97796289fd112bf928b24a]
#
# patch "lib/libwrap/diag.c"
# from [dfb7f964cf942a63b58a3d5e797c39ebdf4e1e34]
# to [f79de19b34c728e8cd786c8aa16c6ea33be34bc7]
#
# patch "lib/libwrap/tcpd.h"
# from [41461e69b24a96533428d44742dec41de3c2bfc7]
# to [56d26860e111cfe3d118d5db63767e9bf259cfa1]
#
# patch "libexec/ftpd/extern.h"
# from [2a4cf6b63ce0f6d4cdb5a519b5b3d4c96b958250]
# to [753b494d2c5481863904cbbba6d80dbcff6c98fa]
#
# patch "libexec/httpd/bozohttpd.h"
# from [f2abb7fd5ae1118729cd76a81f246d209a15ae5f]
# to [fb1b05899a981ca7d8cdf32c4ce9153d5c006fd8]
#
# patch "libexec/ld.elf_so/debug.h"
# from [be1d6a23766e2a13b0b72e481ae84adeba5f0a55]
# to [6c831fd0b41651b750349aab58d795eebfcbbca9]
#
# patch "libexec/ld.elf_so/rtld.h"
# from [d6931fd511ff69541cab230920a6579b95a3c6bc]
# to [676d230edeb7aae5e4b6d88a654a35d657144f8e]
#
# patch "libexec/ld.elf_so/rtldenv.h"
# from [072cbd18828071aad86402fc4c2d1556ff9e5239]
# to [1b45ebad0390ae29b809acfa4cedd4d6a8941dfe]
#
# patch "libexec/mail.local/mail.local.c"
# from [ed81e47e09fee00e9f2148baa31382348256939d]
# to [ba9c72d7c8d7b8dc485dfb7da969789f5a3cbd66]
#
# patch "libexec/rexecd/rexecd.c"
# from [7c2dfa61b0d7fa22032aae6f3d01df82b3bdb820]
# to [f1aa7cd478ad196bab522b5b45d2d2ae86772dcd]
#
# patch "libexec/rshd/rshd.c"
# from [5e3a9c5af19e7a45fb69d3393d4a07efddee5736]
# to [68e484053ea4b7bf3a4dfc31dfb28756c9af572f]
#
# patch "libexec/telnetd/ext.h"
# from [56a79a4f227938cd4a3870e9bbfc9eab6427c657]
# to [89e2fee4697b5166418ebd9bf4caca2ab401e81c]
#
# patch "sbin/dump/dump.h"
# from [d67a7fb62623a9f1359151f8cc9f4c12108a16d2]
# to [c5f3976ffed0a16f6e214722b11fbb89ca1a174a]
#
# patch "sbin/fsck/fsutil.h"
# from [bb14690a5f8204dd760ae4a89dc0a3518cf69a7b]
# to [4676807cb167611029f1a0197a2fd4a05f0c8958]
#
# patch "sbin/fsck_msdos/ext.h"
# from [d2152cb6f122647b9cc2c039a4c7445b32706b0c]
# to [b853f23e202d8ea1efadfc5a72f908c8774bda80]
#
# patch "sbin/init/init.c"
# from [1f04a8e2745bdd28a0734bc585059e31178af29b]
# to [c1bf2550c52b8f42e1fbe875ebff40eef3f70d34]
#
# patch "sbin/newfs_lfs/extern.h"
# from [8fd650ed8fe1e29f14ed67c9b3ded3d6ae04a83f]
# to [34eb4a4a9de1f3517452a9e36f30d21a44a57837]
#
# patch "sbin/restore/extern.h"
# from [d5818f2e497e074bf076db5f411e838fb1111e11]
# to [25bbdc836f59ff7b55673c27806687cde09d1908]
#
# patch "sys/arch/i386/i386/apmbios.c"
# from [b9dbc9e6a01d4e0e4129bdece8afeb09feae7130]
# to [ef4da12f1559c91fff4109daad1a98179f7f8a53]
#
# patch "sys/contrib/dev/ath/netbsd/ah_osdep.c"
# from [c44631495a5c8abbc7b48869cd3d2d44bf8e2d3b]
# to [0f448800ad6c128b96e533f27bd52b28b57d2b15]
#
# patch "sys/ddb/db_output.h"
# from [78984a1a32aa8a148c33ba4c82c0debdfe75b069]
# to [1193cf7c4376a692062e72af2c033f02881005ac]
#
# patch "sys/dev/apm/apm.c"
# from [1ee569ea3d476a7e06a90abac0a25f414b185765]
# to [04778f1116e92a03ba2ad10be1cdad7e04776d4f]
#
# patch "sys/dev/hpc/apm/apmdev.c"
# from [d1d3dde7923f67a42f9b74762f606217a6f8f81c]
# to [93bff2c7b17233dc2502000e22d1973794b6bdbf]
#
# patch "sys/dev/ic/ath_netbsd.h"
# from [f530156bc5b6df597191fd39e81c1eaa38b30018]
# to [87f19ea4594430fe6f51dcaab4f8b3ca5b7e6a11]
#
# patch "sys/dev/scsipi/ses.c"
# from [8de9a8d52cfeea49afb2c853c1df1f2756795153]
# to [4f35923acd31137ed44f7a6ea17e4e0d27dcec1f]
#
# patch "sys/kern/kern_runq.c"
# from [4c3e1f79a743b9e0c93ea244ad997553e68e2799]
# to [d89963586dc3ab8e95357c4409f84936e4e25bde]
#
# patch "sys/kern/tty.c"
# from [15917aa59a7ecd476b6fbd10c0b93520a8ea209f]
# to [5828ce4539ea81e028b0609bc935942f85f65209]
#
# patch "sys/lib/libsa/stand.h"
# from [1f3af2f36634961cd82c1c1a6e936cf24c30795e]
# to [01c09fcd6739b4acff733144670fa07bed019874]
#
# patch "sys/net/agr/ieee8023ad_lacp_debug.h"
# from [0279dfe1e629e49242c3e10c548d781729c9c345]
# to [fc9055589c4fa813374f79326fbe011c2ba6c0af]
#
# patch "sys/net/zlib.h"
# from [532cf196fe24629cfa55fb69101430369fee6ba9]
# to [ca56f6da787ee9697c6b4d321a1820d93357d8fb]
#
# patch "sys/net80211/ieee80211_netbsd.h"
# from [7b701886d2f3a96d636f26d37131f7a2a741832a]
# to [837696a27b0aec84afbe8ce5504194ea6038e1b5]
#
# patch "sys/sys/kthread.h"
# from [1e5ac9154f2e21e4568576e0aeb08d796769518f]
# to [250ff184e230049729776f560c0e44b9d09eb78e]
#
# patch "sys/sys/syslog.h"
# from [05fb6f1728ede76fdc84818fcbcfcb7a5ba0dff8]
# to [25b8264f244c335641eafb3c070856f6f5a391e7]
#
# patch "sys/sys/systm.h"
# from [73ee0f2ab13ea2cceab07be34c75bbab0f2de981]
# to [6aba60245a7d168b8a64770ae25078e42058c005]
#
# patch "sys/sys/tprintf.h"
# from [52cfe79e2656556e744f32f67de8b9f19b5da4e5]
# to [2f71f42b5d128696449135378d6127ff1d102d85]
#
# patch "sys/ufs/ffs/ffs_subr.c"
# from [4bbbc8cd7883e4aa98a655f95a60d827974e7ad7]
# to [fcc4ddb2ad43d73166f219e35403d88606195ec7]
#
# patch "tools/compat/compat_defs.h"
# from [ffd42659df49983b5736fed1a632a15199e4b426]
# to [c6560c0ff684c0ae4dccb218aa2b6b5985faddbd]
#
# patch "usr.bin/compress/compress.c"
# from [047358717edc88190061892296cf0bae10d05d8b]
# to [43fb2df67a0b09f7fd92cd6e7ad6d751154ba767]
#
# patch "usr.bin/config/defs.h"
# from [859c2d00cf8b302017224e040f77007c4f51edfa]
# to [240854977149ce05e5a670887e6fa2af6eb03d14]
#
# patch "usr.bin/config/util.c"
# from [a45f8fb30c3a3fb39f38e84d4117415b4ffcaba3]
# to [be84c513426bcdc3c65319ca6821f95f3a0a49fd]
#
# patch "usr.bin/ftp/extern.h"
# from [91394aa217babc6950034bda10d611b2df4204fc]
# to [f01e4bdc0bc6d99baf8d7179501e81996f67ef51]
#
# patch "usr.bin/gzip/gzip.c"
# from [e2693305716c3bf66037b6177e881fe91b9019ad]
# to [c5f03d92f82ce94a95a161590b65216a26301d93]
#
# patch "usr.bin/menuc/defs.h"
# from [4d2f901ab16d4a2368e7c87b7497a108611a39fe]
# to [ae5322a30e053e3b051719000ff4fdc01272e2ea]
#
# patch "usr.bin/patch/util.h"
# from [bf758bd86cc321218ae7611b90c336c981e3b2c3]
# to [52a97e3156d39806d57381aaa06c4391d45ac9cb]
#
# patch "usr.bin/rdist/defs.h"
# from [c260c0a779c480c264c126e730a768b575cb07a5]
# to [c49a2f5d7d67d738a4c92cab519f4e949ac7896c]
#
# patch "usr.bin/rdist/server.c"
# from [57d9400f4921be0f5063be6d424ed312552bf4aa]
# to [8c2b2fc3647bbeb23150ef581cdbd089fb1b3f0e]
#
# patch "usr.bin/rs/rs.c"
# from [6a9efe78073c9b5e76439b8551f15c3e2ff37cd8]
# to [781238b281acd378971120ff8d6f15a90c0d71c6]
#
# patch "usr.bin/sed/extern.h"
# from [2819fb54387b3660ae7e9a7a2fa12107d8476116]
# to [b213924f7f262de2604651d1bed19b3ba57371aa]
#
# patch "usr.bin/systat/extern.h"
# from [f4d0dcd8002d40da68ecfbc71282931ff65415c2]
# to [fcd075dbedb70f19976533f70a040c492ea236de]
#
# patch "usr.bin/tail/extern.h"
# from [2e389212c5218bb1fa7ac9047e6a4440bb313a80]
# to [2eaed5f0ed545f5de7e6ba0a0a9ed92608ef6328]
#
# patch "usr.bin/vi/include/com_extern.h"
# from [7deaa4ff4646ca0d553d2fd1941ecc60b611db41]
# to [58b5d427d68c4055da1c9bb6221dbdbd2e97051f]
#
# patch "usr.bin/vi/include/ex_extern.h"
# from [5aadb2e32fda20e5c8b2a00806be5a15010cdc4f]
# to [4f66f020f62374729dc3056a705a05dcefe1acc7]
#
# patch "usr.bin/xlint/lint1/externs1.h"
# from [6c1dafabdc550171116bb33f92eac0399320b35a]
# to [cfb3f96528cdb678b09735a37219bccbb2e609d0]
#
# patch "usr.sbin/bootp/common/report.h"
# from [977d620930f3d22fd49d10833048f845bf3f0e42]
# to [f1d12cff398baec222e9e022d61dfc75aaeb6220]
#
# patch "usr.sbin/faithd/faithd.c"
# from [b4fe684988e68e508623139bd9d4af5d2de02346]
# to [6acc3ebaeeaae35bc3daef43feb793c7547e368f]
#
# patch "usr.sbin/faithd/faithd.h"
# from [529ddd8f523468a195c5f4982d69bb4c96ceabde]
# to [8a8706c46290123c7090f65b41f2e24e2e1dd974]
#
# patch "usr.sbin/gspa/gspa/gsp_ass.h"
# from [8c5e1d82c5fd2f8b2bea0f832f6a8e6990838414]
# to [d369c564ee0854627adbd6a4fcb8fb8c93482756]
#
# patch "usr.sbin/lpr/common_source/lp.h"
# from [3ed2591bbcbc3abc87055a96db2fe5cfaec607f3]
# to [67dc50c7432b62833088a93f0f25d6e5d12ecca7]
#
# patch "usr.sbin/lpr/lpd/printjob.c"
# from [4b251b33e1db5450cd567d733c6e55302d4febae]
# to [835b46e4aaee7176f2d9241ef8422a8d7b260a1e]
#
# patch "usr.sbin/lpr/lpd/recvjob.c"
# from [2996c600d72a9ab39e79e9ded7ad94157136bd6d]
# to [236034223213c568e083ab302e492447a67dc822]
#
# patch "usr.sbin/lpr/lpr/lpr.c"
# from [6809a2fde3e38df2fe1c25fd7e0af5ba25047d5a]
# to [bd2c3a4b86f591ebbe4f15399ae7dc96f594eae1]
#
# patch "usr.sbin/makefs/ffs/ffs_extern.h"
# from [6526c76c7cd263a8a695f021066ac1949d90761e]
# to [783bad79b06389b2c2f473c68dc416fc98add288]
#
# patch "usr.sbin/map-mbone/mapper.c"
# from [7ec0f3e194efc28035938db783f73abe44d1c2d3]
# to [a0d09361329d49b23a0c77a4f9c589d9486c201e]
#
# patch "usr.sbin/mopd/common/log.h"
# from [5e8f4c2c3421bef1f15faae518b5b86ae81decc3]
# to [30dda14b39c5c9116910df85806d6769281544ce]
#
# patch "usr.sbin/mrouted/defs.h"
# from [3bac5e492504d5d89b773fa85afa88545fc1df86]
# to [e77b1328b61a65e1438ec4d8e3ce93b4e141c01e]
#
# patch "usr.sbin/mrouted/main.c"
# from [c81cc706d9074a15e01cf7dffcfba62e377a49b8]
# to [00c5b14ea6e364ed09ec0c8a74e1985d551f089a]
#
# patch "usr.sbin/mtree/create.c"
# from [4de64d5be3479eb6a12482ff216eee9a284499b9]
# to [7a4760d76b845696a4e9567fad1bb5bffa1a2f0c]
#
# patch "usr.sbin/mtree/extern.h"
# from [0aeb7590c14a79696c2362714fb1ddb7367e6c5a]
# to [16d5c914376292884c1c0d9a6193f950411cb761]
#
# patch "usr.sbin/rarpd/rarpd.c"
# from [4892d335d6c7a8a0cf490b24d23926dec259b935]
# to [b6442d4615336cba149739693f1bbf846b25b3c3]
#
# patch "usr.sbin/route6d/route6d.c"
# from [5b340dd9b712e733114af9151dabc216a4661f07]
# to [f31705be8a1f8769346cc9894520d4f7347d0a20]
#
# patch "usr.sbin/rtsold/rtsold.h"
# from [d1e06a057e626d48c52619159e3cf40d373a48fb]
# to [c6395f91d400fb9ad07844691dc7739f1b37b981]
#
# patch "usr.sbin/sup/source/supextern.h"
# from [5b4789034ad2e5baf1dd621a925e1f81e3bf4099]
# to [4de89bb2fefa0c0ffb10d14265728763fb837fc0]
#
# patch "usr.sbin/user/user.c"
# from [493e14237d7d3189b3a1c0c71820eaa03196ce80]
# to [b5dcef97c2e5b37c278e6c18c0c89ce5b72c00f2]
#
# patch "usr.sbin/ypbind/ypbind.c"
# from [c3e993694dda03b174c98a1749e0dd4d3b2b2550]
# to [13a605004bdb0b1a9cf0118dd553eb3e95569f63]
#
============================================================
--- bin/sh/output.h 56fa6d769f091474ee38729779f22140e465b4fb
+++ bin/sh/output.h 763dfbc10b87084f2abedb9edbb8e262b3cbead5
@@ -62,13 +62,13 @@ void outfmt(struct output *, const char
void flushout(struct output *);
void freestdout(void);
void outfmt(struct output *, const char *, ...)
- __attribute__((__format__(__printf__,2,3)));
+ __printflike(2,3);
void out1fmt(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
+ __printflike(1,2);
void dprintf(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
+ __printflike(1,2);
void fmtstr(char *, size_t, const char *, ...)
- __attribute__((__format__(__printf__,3,4)));
+ __printflike(3,4);
void doformat(struct output *, const char *, va_list);
int xwrite(int, char *, int);
int xioctl(int, unsigned long, char *);
============================================================
--- games/cribbage/cribbage.h c709a9995a4cf7d5da9f3623d6ff169618fc48e8
+++ games/cribbage/cribbage.h 6396cec86f5c0923826ec246e12fd2493442424f
@@ -57,7 +57,7 @@ void addmsg(const char *, ...)
extern char explan[]; /* string for explanation */
void addmsg(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
int adjust(const CARD [], CARD);
int anymove(const CARD [], int, int);
int anysumto(const CARD [], int, int, int);
@@ -86,7 +86,7 @@ void msg(const char *, ...)
void makedeck(CARD []);
void makeknown(const CARD [], int);
void msg(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
int msgcard(CARD, BOOLEAN);
int msgcrd(CARD, BOOLEAN, const char *, BOOLEAN);
int number(int, int, const char *);
============================================================
--- games/hack/extern.h 67e9c047497453525fb3a1a61ec15ee7e0bca9bd
+++ games/hack/extern.h 14e233afdc949a291eac7099394a92c95b715128
@@ -249,7 +249,7 @@ void impossible(const char *, ...)
void glo(int);
void askname(void);
void impossible(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void stop_occupation(void);
/* hack.makemon.c */
@@ -392,7 +392,7 @@ void panic(const char *, ...)
/* hack.pri.c */
void swallowed(void);
void panic(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void atl(int, int, int);
void on_scr(int, int);
void tmp_at(schar, schar);
@@ -521,9 +521,9 @@ void pline(const char *, ...)
void cmore(const char *);
void clrlin(void);
void pline(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void vpline(const char *, va_list)
- __attribute__((__format__(__printf__, 1, 0)));
+ __printflike(1,0);
void putsym(int);
void putstr(const char *);
@@ -555,7 +555,7 @@ void error(const char *, ...)
void setctty(void);
void setftty(void);
void error(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2),__noreturn__));
+ __printflike(1,2) __attribute__((__noreturn__));
void getlin(char *);
void getret(void);
void cgetret(const char *);
============================================================
--- games/larn/extern.h 161f1b9cdb9429fe6265db4a51dab3a0032817ce
+++ games/larn/extern.h 1a321711b6da7f5e115f092f119ea655b21f823d
@@ -122,7 +122,7 @@ void newgame(void);
void scbr(void);
void sncbr(void);
void newgame(void);
-void lprintf(const char *, ...) __attribute__((__format__(__printf__, 1, 2)));
+void lprintf(const char *, ...) __printflike(1,2);
void lprint(long);
void lwrite(char *, int);
long lgetc(void);
============================================================
--- games/rogue/inventory.c c301721ee10eb4dad65fc4810fd024f9459a7c9a
+++ games/rogue/inventory.c 55e357bcb78653a7bdb98612b5286f7ffa3e0f2d
@@ -467,7 +467,7 @@ static void sbuf_addf(struct sbuf *s, co
static void sbuf_init(struct sbuf *s, char *buf, size_t maxlen);
static void sbuf_addstr(struct sbuf *s, const char *str);
static void sbuf_addf(struct sbuf *s, const char *fmt, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
static void desc_count(struct sbuf *s, int n);
static void desc_called(struct sbuf *s, const object *);
============================================================
--- games/rogue/rogue.h 8759f27e378e2114f48e3bfe501c19dcb694d49c
+++ games/rogue/rogue.h 47120c6fab312b2f30fa5ebadf6d59e1f04ab712
@@ -574,7 +574,7 @@ void messagef(boolean, const char *, ...
void md_slurp(void);
/*void message(const char *, boolean);*/
void messagef(boolean, const char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
void mix_colors(void);
int mon_can_go(const object *, short, short);
int mon_damage(object *, short);
============================================================
--- games/sail/extern.h 841d0799b3c2e57bb43f1a53ea7f6248a640d39d
+++ games/sail/extern.h 0e3623c72d7e105861633b718f028a4f464d851c
@@ -378,9 +378,9 @@ void Signal (const char *, struct ship *
void cleanupscreen (void);
void newturn (int);
void Signal (const char *, struct ship *, ...)
- __attribute__((__format__(__printf__,1,3)));
+ __printflike(1,3);
void Msg (const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
+ __printflike(1,2);
void prompt (const char *, struct ship *);
int sgetch (const char *, struct ship *, int);
void sgetstr (const char *, char *, int);
@@ -402,9 +402,9 @@ void makesignal (struct ship *, const ch
/* sync.c */
void fmtship (char *, size_t, const char *, struct ship *);
void makesignal (struct ship *, const char *, struct ship *, ...)
- __attribute__((__format__(__printf__,2,4)));
+ __printflike(2,4);
void makemsg (struct ship *, const char *, ...)
- __attribute__((__format__(__printf__,2,3)));
+ __printflike(2,3);
int sync_exists (int);
int sync_open (void);
void sync_close (int);
============================================================
--- include/err.h ea280165416597373bfed0abaee5f8fb8ff29964
+++ include/err.h 123c26c1c74337be56c8faec215e14e9bd792c83
@@ -46,21 +46,21 @@ __dead void err(int, const char *, ...)
__BEGIN_DECLS
__dead void err(int, const char *, ...)
- __attribute__((__noreturn__, __format__(__printf__, 2, 3)));
+ __attribute__((__noreturn__)) __printflike(2,3);
__dead void verr(int, const char *, _BSD_VA_LIST_)
- __attribute__((__noreturn__, __format__(__printf__, 2, 0)));
+ __attribute__((__noreturn__)) __printflike(2,0);
__dead void errx(int, const char *, ...)
- __attribute__((__noreturn__, __format__(__printf__, 2, 3)));
+ __attribute__((__noreturn__)) __printflike(2,3);
__dead void verrx(int, const char *, _BSD_VA_LIST_)
- __attribute__((__noreturn__, __format__(__printf__, 2, 0)));
+ __attribute__((__noreturn__)) __printflike(2,0);
void warn(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void vwarn(const char *, _BSD_VA_LIST_)
- __attribute__((__format__(__printf__, 1, 0)));
+ __printflike(1,0);
void warnx(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void vwarnx(const char *, _BSD_VA_LIST_)
- __attribute__((__format__(__printf__, 1, 0)));
+ __printflike(1,0);
__END_DECLS
#endif /* !_ERR_H_ */
============================================================
--- include/ssp/stdio.h f04b78bfb36242101ed610ff39e4855b8603ee04
+++ include/ssp/stdio.h 54057084ff20fc619089a4ef19afa3043eb0d5a0
@@ -35,14 +35,14 @@ int __sprintf_chk(char *__restrict, int,
__BEGIN_DECLS
int __sprintf_chk(char *__restrict, int, size_t, const char *__restrict, ...)
- __attribute__((__format__(__printf__, 4, 5)));
+ __printflike(4,5);
int __vsprintf_chk(char *__restrict, int, size_t, const char *__restrict,
- _BSD_VA_LIST_) __attribute__((__format__(__printf__, 4, 0)));
+ _BSD_VA_LIST_) __printflike(4,0);
int __snprintf_chk(char *__restrict, size_t, int, size_t,
- const char *__restrict, ...) __attribute__((__format__(__printf__, 5, 6)));
+ const char *__restrict, ...) __printflike(5,6);
int __vsnprintf_chk(char *__restrict, size_t, int, size_t,
const char *__restrict, _BSD_VA_LIST_)
- __attribute__((__format__(__printf__, 5, 0)));
+ __printflike(5,0);
char *__gets_chk(char *, size_t);
char *__fgets_chk(char *, int, size_t, FILE *);
__END_DECLS
============================================================
--- include/stdio.h 2ab63d082e2bc417555a7bb654110f179005ddfc
+++ include/stdio.h e1ed71c8ba026736a184e601601d789e83b740f0
@@ -322,10 +322,10 @@ int snprintf(char * __restrict, size_t,
defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE)
__BEGIN_DECLS
int snprintf(char * __restrict, size_t, const char * __restrict, ...)
- __attribute__((__format__(__printf__, 3, 4)));
+ __printflike(3,4);
int vsnprintf(char * __restrict, size_t, const char * __restrict,
_BSD_VA_LIST_)
- __attribute__((__format__(__printf__, 3, 0)));
+ __printflike(3,0);
__END_DECLS
#endif
@@ -372,7 +372,7 @@ int asprintf(char ** __restrict, const
__BEGIN_DECLS
int asprintf(char ** __restrict, const char * __restrict, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
char *fgetln(FILE * __restrict, size_t * __restrict);
char *fparseln(FILE *, size_t *, size_t *, const char[3], int);
int fpurge(FILE *);
@@ -380,15 +380,15 @@ int vasprintf(char ** __restrict, const
int setlinebuf(FILE *);
int vasprintf(char ** __restrict, const char * __restrict,
_BSD_VA_LIST_)
- __attribute__((__format__(__printf__, 2, 0)));
+ __printflike(2,0);
int vscanf(const char * __restrict, _BSD_VA_LIST_)
- __attribute__((__format__(__scanf__, 1, 0)));
+ __scanflike(1,0);
int vfscanf(FILE * __restrict, const char * __restrict,
_BSD_VA_LIST_)
- __attribute__((__format__(__scanf__, 2, 0)));
+ __scanflike(2,0);
int vsscanf(const char * __restrict, const char * __restrict,
_BSD_VA_LIST_)
- __attribute__((__format__(__scanf__, 2, 0)));
+ __scanflike(2,0);
const char *fmtcheck(const char *, const char *)
__attribute__((__format_arg__(2)));
__END_DECLS
============================================================
--- include/stdlib.h e353a0264cf9c0d96f929dda02849305c6e06f74
+++ include/stdlib.h 837aa2b2ca7a5f65a4b8d9b20c246c420d2e57d9
@@ -294,7 +294,7 @@ void setproctitle(const char *, ...)
unsigned);
void setproctitle(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
const char *getprogname(void) __attribute__((const));
void setprogname(const char *);
============================================================
--- include/util.h 1dbcfffcc223caa05c86374829a0151853bb27e3
+++ include/util.h a7107b2922127646f7003988d7c6f596f26a1f80
@@ -129,10 +129,10 @@ int easprintf(char ** __restrict, cons
void *erealloc(void *, size_t);
struct __sFILE *efopen(const char *, const char *);
int easprintf(char ** __restrict, const char * __restrict, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
int evasprintf(char ** __restrict, const char * __restrict,
_BSD_VA_LIST_)
- __attribute__((__format__(__printf__, 2, 0)));
+ __printflike(2,0);
__END_DECLS
#endif /* !_UTIL_H_ */
============================================================
--- lib/libc/include/extern.h 5f6f2edfb9d84bee0703e54c3a11a21000683bf2
+++ lib/libc/include/extern.h 91ff2f257fc05ffba1eea8bd7288e6e7e55b0f6e
@@ -53,13 +53,13 @@ void syslog_ss(int, struct syslog_data *
struct syslog_data;
void syslog_ss(int, struct syslog_data *, const char *, ...)
- __attribute__((__format__(__printf__,3,4)));
+ __printflike(3,4);
void vsyslog_ss(int, struct syslog_data *, const char *, _BSD_VA_LIST_);
int snprintf_ss(char * __restrict, size_t, const char * __restrict, ...)
- __attribute__((__format__(__printf__, 3, 4)));
+ __printflike(3,4);
int vsnprintf_ss(char * __restrict, size_t, const char * __restrict,
- _BSD_VA_LIST_) __attribute__((__format__(__printf__, 3, 0)));
+ _BSD_VA_LIST_) __printflike(3,0);
void _malloc_prefork(void);
void _malloc_postfork(void);
============================================================
--- lib/libc/net/gethnamaddr.c d18bf3e1313d5d96b28386b7ab8e9890a78841bb
+++ lib/libc/net/gethnamaddr.c 5d7c9c327c833275d0f91884a4d89352c926abf0
@@ -134,7 +134,7 @@ static void dprintf(const char *, res_st
#ifdef DEBUG
static void dprintf(const char *, res_state, ...)
- __attribute__((__format__(__printf__, 1, 3)));
+ __printflike(1,3);
#endif
static struct hostent *getanswer(const querybuf *, int, const char *, int,
res_state);
============================================================
--- lib/libc/stdio/local.h d78fa75243d73eda776b5e44b462a87c17aa9227
+++ lib/libc/stdio/local.h 29dc71365a607f3522819d9df5845b6b485aeceb
@@ -60,10 +60,10 @@ extern int __svfscanf __P((FILE * __rest
extern int __sflags __P((const char *, int *));
extern int __svfscanf __P((FILE * __restrict, const char * __restrict,
_BSD_VA_LIST_))
- __attribute__((__format__(__scanf__, 2, 0)));
+ __scanflike(2,0);
extern int __svfscanf_unlocked __P((FILE * __restrict, const char * __restrict,
_BSD_VA_LIST_))
- __attribute__((__format__(__scanf__, 2, 0)));
+ __scanflike(2,0);
extern int __vfprintf_unlocked __P((FILE * __restrict, const char * __restrict,
_BSD_VA_LIST_));
============================================================
--- lib/libcurses/curses.h 2890c830b4b8817efcf3ae2714e0c275b63d5a69
+++ lib/libcurses/curses.h bc6236aa153e83830d6cc6c4abc01d011b1b63a1
@@ -675,9 +675,9 @@ int mvprintw(int, int, const char *, ..
int mvderwin(WINDOW *, int, int);
int mvhline(int, int, chtype, int);
int mvprintw(int, int, const char *, ...)
- __attribute__((__format__(__printf__, 3, 4)));
+ __printflike(3,4);
int mvscanw(int, int, const char *, ...)
- __attribute__((__format__(__scanf__, 3, 4)));
+ __scanflike(3,4);
int mvvline(int, int, chtype, int);
int mvwhline(WINDOW *, int, int, chtype, int);
int mvwvline(WINDOW *, int, int, chtype, int);
@@ -687,9 +687,9 @@ int mvwprintw(WINDOW *, int, int, const
int mvwinnstr(WINDOW *, int, int, char *, int);
int mvwinstr(WINDOW *, int, int, char *);
int mvwprintw(WINDOW *, int, int, const char *, ...)
- __attribute__((__format__(__printf__, 4, 5)));
+ __printflike(4,5);
int mvwscanw(WINDOW *, int, int, const char *, ...)
- __attribute__((__format__(__scanf__, 4, 5)));
+ __scanflike(4,5);
int napms(int);
WINDOW *newpad(int, int);
SCREEN *newterm(char *, FILE *, FILE *);
@@ -710,7 +710,7 @@ int printw(const char *, ...)
int pnoutrefresh(WINDOW *, int, int, int, int, int, int);
int prefresh(WINDOW *, int, int, int, int, int, int);
int printw(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
int putwin(WINDOW *, FILE *);
void qiflush(void);
int raw(void);
@@ -721,7 +721,7 @@ int scanw(const char *, ...)
int resizeterm(int, int);
int savetty(void);
int scanw(const char *, ...)
- __attribute__((__format__(__scanf__, 1, 2)));
+ __scanflike(1,2);
int scroll(WINDOW *);
int scrollok(WINDOW *, bool);
int setterm(char *);
@@ -739,9 +739,9 @@ int vwprintw(WINDOW *, const char *, _B
int use_default_colors(void);
int vline(chtype, int);
int vwprintw(WINDOW *, const char *, _BSD_VA_LIST_)
- __attribute__((__format__(__printf__, 2, 0)));
+ __printflike(2,0);
int vwscanw(WINDOW *, const char *, _BSD_VA_LIST_)
- __attribute__((__format__(__scanf__, 2, 0)));
+ __scanflike(2,0);
int waddch(WINDOW *, chtype);
int waddchnstr(WINDOW *, const chtype *, int);
int waddchstr(WINDOW *, const chtype *);
@@ -780,12 +780,12 @@ int wprintw(WINDOW *, const char *, ...
int wmove(WINDOW *, int, int);
int wnoutrefresh(WINDOW *);
int wprintw(WINDOW *, const char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
int wredrawln(WINDOW *, int, int);
int wrefresh(WINDOW *);
int wresize(WINDOW *, int, int);
int wscanw(WINDOW *, const char *, ...)
- __attribute__((__format__(__scanf__, 2, 3)));
+ __scanflike(2,3);
int wscrl(WINDOW *, int);
int wsetscrreg(WINDOW *, int, int);
int wstandend(WINDOW *);
============================================================
--- lib/libcurses/curses_private.h 7ec24d53ca4a7c7d9ef299027b8ce87b1b444124
+++ lib/libcurses/curses_private.h bee7bb35868de5609430872ab55130347abf29c0
@@ -342,7 +342,7 @@ void __CTRACE_init(void);
#define __CTRACE_FILEIO 0x00001000
#define __CTRACE_ALL 0x7fffffff
void __CTRACE_init(void);
-void __CTRACE(int, const char *, ...) __attribute__((__format__(__printf__, 2, 3)));
+void __CTRACE(int, const char *, ...) __printflike(2,3);
#endif
/* Private functions. */
============================================================
--- lib/libform/form.h 7f9745a4524de86374c96b53c33380b6ee8a157d
+++ lib/libform/form.h 03f297bc82ec4159cb8041b08100bfa91b22ea68
@@ -356,7 +356,7 @@ int set_field_printf(FIELD *, i
int set_field_opts(FIELD *, Form_Options);
int set_field_pad(FIELD *, int);
int set_field_printf(FIELD *, int, char *, ...)
- __attribute__((__format__(__printf__, 3, 4)));
+ __printflike(3,4);
int set_field_status(FIELD *, int);
int set_field_term(FORM *, Form_Hook);
int set_field_type(FIELD *, FIELDTYPE *, ...);
============================================================
--- lib/libkvm/kvm_private.h 956822d766ad54261c18b6093a17d677f0c11e8b
+++ lib/libkvm/kvm_private.h 7b3040f8c286a3185c97796289fd112bf928b24a
@@ -105,7 +105,7 @@ void _kvm_err __P((kvm_t *kd, const cha
* Functions used internally by kvm, but across kvm modules.
*/
void _kvm_err __P((kvm_t *kd, const char *program, const char *fmt, ...))
- __attribute__((__format__(__printf__, 3, 4)));
+ __printflike(3,4);
int _kvm_dump_mkheader __P((kvm_t *kd_live, kvm_t *kd_dump));
void _kvm_freeprocs __P((kvm_t *kd));
void _kvm_freevtop __P((kvm_t *));
@@ -117,7 +117,7 @@ void _kvm_syserr
void *_kvm_realloc __P((kvm_t *kd, void *, size_t));
void _kvm_syserr
__P((kvm_t *kd, const char *program, const char *fmt, ...))
- __attribute__((__format__(__printf__, 3, 4)));
+ __printflike(3,4);
ssize_t _kvm_pread(kvm_t *, int, void *, size_t, off_t);
#define KVM_ALLOC(kd, member, size) \
============================================================
--- lib/libwrap/diag.c dfb7f964cf942a63b58a3d5e797c39ebdf4e1e34
+++ lib/libwrap/diag.c f79de19b34c728e8cd786c8aa16c6ea33be34bc7
@@ -37,7 +37,7 @@ static void tcpd_diag __P((int, char *,
jmp_buf tcpd_buf;
static void tcpd_diag __P((int, char *, char *, va_list))
- __attribute__((__format__(__printf__, 3, 0)));
+ __printflike(3,0);
/* tcpd_diag - centralize error reporter */
============================================================
--- lib/libwrap/tcpd.h 41461e69b24a96533428d44742dec41de3c2bfc7
+++ lib/libwrap/tcpd.h 56d26860e111cfe3d118d5db63767e9bf259cfa1
@@ -173,10 +173,10 @@ extern void tcpd_warn /* report proble
extern void tcpd_warn /* report problem and proceed */
__P((char *, ...))
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
extern void tcpd_jump /* report problem and jump */
__P((char *, ...))
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
__END_DECLS
struct tcpd_context {
============================================================
--- libexec/ftpd/extern.h 2a4cf6b63ce0f6d4cdb5a519b5b3d4c96b958250
+++ libexec/ftpd/extern.h 753b494d2c5481863904cbbba6d80dbcff6c98fa
@@ -120,7 +120,7 @@ void cprintf(FILE *, const char *, ...)
char **copyblk(char **);
void count_users(void);
void cprintf(FILE *, const char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
void cwd(const char *);
FILE *dataconn(const char *, off_t, const char *);
void delete(const char *);
@@ -157,7 +157,7 @@ void reply(int, const char *, ...)
void renamecmd(const char *, const char *);
char *renamefrom(const char *);
void reply(int, const char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
void retrieve(char *[], const char *);
void send_file_list(const char *);
void show_chdir_messages(int);
============================================================
--- libexec/httpd/bozohttpd.h f2abb7fd5ae1118729cd76a81f246d209a15ae5f
+++ libexec/httpd/bozohttpd.h fb1b05899a981ca7d8cdf32c4ce9153d5c006fd8
@@ -103,16 +103,16 @@ void debug__(int, const char *, ...)
#ifdef DEBUG
void debug__(int, const char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
#define debug(x) debug__ x
#else
#define debug(x)
#endif /* DEBUG */
void warning(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void error(int, const char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
void http_error(int, http_req *, const char *)
__attribute__((__noreturn__));
============================================================
--- libexec/ld.elf_so/debug.h be1d6a23766e2a13b0b72e481ae84adeba5f0a55
+++ libexec/ld.elf_so/debug.h 6c831fd0b41651b750349aab58d795eebfcbbca9
@@ -42,7 +42,7 @@ extern void debug_printf __P((const char
#ifdef DEBUG
extern void debug_printf __P((const char *, ...))
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
extern int debug;
# define dbg(a) debug_printf a
============================================================
--- libexec/ld.elf_so/rtld.h d6931fd511ff69541cab230920a6579b95a3c6bc
+++ libexec/ld.elf_so/rtld.h 676d230edeb7aae5e4b6d88a654a35d657144f8e
@@ -224,7 +224,7 @@ void _rtld_error(const char *, ...)
int dladdr(const void *, Dl_info *);
void _rtld_error(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
+ __printflike(1,2);
void _rtld_die(void) __attribute__((__noreturn__));
void *_rtld_objmain_sym(const char *);
void _rtld_debug_state(void);
============================================================
--- libexec/ld.elf_so/rtldenv.h 072cbd18828071aad86402fc4c2d1556ff9e5239
+++ libexec/ld.elf_so/rtldenv.h 1b45ebad0390ae29b809acfa4cedd4d6a8941dfe
@@ -41,21 +41,21 @@ void xprintf(const char *, ...)
#ifdef RTLD_LOADER
void xprintf(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void xvprintf(const char *, va_list)
- __attribute__((__format__(__printf__, 1, 0)));
+ __printflike(1,0);
void xsnprintf(char *, size_t, const char *, ...)
- __attribute__((__format__(__printf__, 3, 4)));
+ __printflike(3,4);
size_t xvsnprintf(char *, size_t, const char *, va_list)
- __attribute__((__format__(__printf__, 3, 0)));
+ __printflike(3,0);
void xwarn(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void xwarnx(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void xerr(int, const char *, ...)
- __attribute__((__noreturn__, __format__(__printf__, 2, 3)));
+ __attribute__((__noreturn__)) __printflike(2,3);
void xerrx(int, const char *, ...)
- __attribute__((__noreturn__, __format__(__printf__, 2, 3)));
+ __attribute__((__noreturn__)) __printflike(2,3);
void xassert(const char *, int, const char *);
const char *xstrerror(int);
============================================================
--- libexec/mail.local/mail.local.c ed81e47e09fee00e9f2148baa31382348256939d
+++ libexec/mail.local/mail.local.c ba9c72d7c8d7b8dc485dfb7da969789f5a3cbd66
@@ -64,9 +64,9 @@ void logerr __P((int, const char *, ...)
int deliver __P((int, char *, int));
void logerr __P((int, const char *, ...))
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
void logwarn __P((const char *, ...))
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void notifybiff __P((char *));
int store __P((const char *));
void usage __P((void));
============================================================
--- libexec/rexecd/rexecd.c 7c2dfa61b0d7fa22032aae6f3d01df82b3bdb820
+++ libexec/rexecd/rexecd.c f1aa7cd478ad196bab522b5b45d2d2ae86772dcd
@@ -68,7 +68,7 @@ static void rexecd_errx(int, const char
int main(int, char *[]);
static void rexecd_errx(int, const char *, ...)
- __attribute__((__noreturn__, __format__(__printf__, 2, 3)));
+ __attribute__((__noreturn__)) __printflike(2,3);
static void doit(struct sockaddr *) __dead;
static void getstr(char *, int, const char *);
static void usage(void) __dead;
============================================================
--- libexec/rshd/rshd.c 5e3a9c5af19e7a45fb69d3393d4a07efddee5736
+++ libexec/rshd/rshd.c 68e484053ea4b7bf3a4dfc31dfb28756c9af572f
@@ -139,7 +139,7 @@ void rshd_errx(int, const char *, ...)
void doit(struct sockaddr *) __dead;
void rshd_errx(int, const char *, ...)
- __attribute__((__noreturn__, __format__(__printf__, 2, 3)));
+ __attribute__((__noreturn__)) __printflike(2,3);
void getstr(char *, int, const char *);
int local_domain(char *);
char *topdomain(char *);
============================================================
--- libexec/telnetd/ext.h 56a79a4f227938cd4a3870e9bbfc9eab6427c657
+++ libexec/telnetd/ext.h 89e2fee4697b5166418ebd9bf4caca2ab401e81c
@@ -168,7 +168,7 @@ extern int output_data(const char *, ...
writenet(unsigned char *, int);
extern int output_data(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
extern int output_datalen(const char *, size_t);
#ifdef ENCRYPTION
============================================================
--- sbin/dump/dump.h d67a7fb62623a9f1359151f8cc9f4c12108a16d2
+++ sbin/dump/dump.h c5f3976ffed0a16f6e214722b11fbb89ca1a174a
@@ -174,10 +174,10 @@ void lastdump(char);
/* operator interface functions */
void broadcast(const char *);
void lastdump(char);
-void msg(const char *fmt, ...) __attribute__((__format__(__printf__,1,2)));
-void msgtail(const char *fmt, ...) __attribute__((__format__(__printf__,1,2)));
+void msg(const char *fmt, ...) __printflike(1,2);
+void msgtail(const char *fmt, ...) __printflike(1,2);
int query(const char *);
-void quit(const char *fmt, ...) __attribute__((__format__(__printf__,1,2)));
+void quit(const char *fmt, ...) __printflike(1,2);
time_t do_stats(void);
void statussig(int);
void timeest(void);
============================================================
--- sbin/fsck/fsutil.h bb14690a5f8204dd760ae4a89dc0a3518cf69a7b
+++ sbin/fsck/fsutil.h 4676807cb167611029f1a0197a2fd4a05f0c8958
@@ -32,17 +32,17 @@ void errexit(const char *, ...)
#include <stdarg.h>
void errexit(const char *, ...)
- __attribute__((__noreturn__,__format__(__printf__,1,2)));
+ __attribute__((__noreturn__)) __printflike(1,2);
void pfatal(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
+ __printflike(1,2);
void pwarn(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
+ __printflike(1,2);
void perr(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
+ __printflike(1,2);
void panic(const char *, ...)
- __attribute__((__noreturn__,__format__(__printf__,1,2)));
+ __attribute__((__noreturn__)) __printflike(1,2);
void vmsg(int, const char *, va_list)
- __attribute__((__format__(__printf__,2,0)));
+ __printflike(2,0);
const char *rawname(const char *);
const char *unrawname(const char *);
const char *blockcheck(const char *);
============================================================
--- sbin/fsck_msdos/ext.h d2152cb6f122647b9cc2c039a4c7445b32706b0c
+++ sbin/fsck_msdos/ext.h b853f23e202d8ea1efadfc5a72f908c8774bda80
@@ -49,7 +49,7 @@ extern struct dosDirEntry *rootDir;
/*
* function declarations
*/
-int ask(int, const char *, ...) __attribute__((__format__(__printf__,2,3)));
+int ask(int, const char *, ...) __printflike(2,3);
/*
* Check filesystem given as arg
============================================================
--- sbin/init/init.c 1f04a8e2745bdd28a0734bc585059e31178af29b
+++ sbin/init/init.c c1bf2550c52b8f42e1fbe875ebff40eef3f70d34
@@ -107,11 +107,11 @@ void stall(const char *, ...)
void delset(sigset_t *, ...);
void stall(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
+ __printflike(1,2);
void warning(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
+ __printflike(1,2);
void emergency(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
+ __printflike(1,2);
void disaster(int);
void badsys(int);
============================================================
--- sbin/newfs_lfs/extern.h 8fd650ed8fe1e29f14ed67c9b3ded3d6ae04a83f
+++ sbin/newfs_lfs/extern.h 34eb4a4a9de1f3517452a9e36f30d21a44a57837
@@ -35,7 +35,7 @@ void fatal(const char *fmt, ...)
uint32_t lfs_sb_cksum(struct dlfs *);
void fatal(const char *fmt, ...)
- __attribute__((__format__(__printf__,1,2)));
+ __printflike(1,2);
u_int lfs_log2(u_int);
int make_lfs(int, uint, struct dkwedge_info *, int,
int, int, int, int, int, int, daddr_t, int, int, u_int32_t);
============================================================
--- sbin/restore/extern.h d5818f2e497e074bf076db5f411e838fb1111e11
+++ sbin/restore/extern.h 25bbdc836f59ff7b55673c27806687cde09d1908
@@ -69,14 +69,14 @@ void msg(const char *, ...)
void mktempname(struct entry *);
void moveentry(struct entry *, const char *);
void msg(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
+ __printflike(1,2);
char *myname(struct entry *);
void newnode(struct entry *);
void newtapebuf(long);
long nodeupdates(const char *, ino_t, int);
void onintr(int);
void panic(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
+ __printflike(1,2);
void pathcheck(char *);
struct direct *pathsearch(const char *);
void printdumpinfo(void);
============================================================
--- sys/arch/i386/i386/apmbios.c b9dbc9e6a01d4e0e4129bdece8afeb09feae7130
+++ sys/arch/i386/i386/apmbios.c ef4da12f1559c91fff4109daad1a98179f7f8a53
@@ -124,7 +124,7 @@ static void apm_perror(const char *, str
extern int apm_v11_enabled;
static void apm_perror(const char *, struct bioscallregs *, ...)
- __attribute__((__format__(__printf__,1,3)));
+ __printflike(1,3);
static void apm_powmgt_enable(int);
static void apm_powmgt_engage(int, u_int);
static int apm_get_ver(struct apm_softc *);
============================================================
--- sys/contrib/dev/ath/netbsd/ah_osdep.c c44631495a5c8abbc7b48869cd3d2d44bf8e2d3b
+++ sys/contrib/dev/ath/netbsd/ah_osdep.c 0f448800ad6c128b96e533f27bd52b28b57d2b15
@@ -70,8 +70,6 @@ __KERNEL_RCSID(0, "$NetBSD$");
#define EXIT /* nothing */
#endif
-#define __printflike(__a, __b) __attribute__((__format__(__printf__,__a,__b)))
-
extern void ath_hal_printf(struct ath_hal *, const char*, ...)
__printflike(2,3);
extern void ath_hal_vprintf(struct ath_hal *, const char*, va_list)
============================================================
--- sys/ddb/db_output.h 78984a1a32aa8a148c33ba4c82c0debdfe75b069
+++ sys/ddb/db_output.h 1193cf7c4376a692062e72af2c033f02881005ac
@@ -36,7 +36,7 @@ void db_printf(const char *, ...)
void db_putchar(int);
int db_print_position(void);
void db_printf(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
+ __printflike(1,2);
void db_vprintf __P((const char *, _BSD_VA_LIST_));
void db_format_radix(char *, size_t, quad_t, int);
void db_format_hex(char *, size_t, quad_t, int);
============================================================
--- sys/dev/apm/apm.c 1ee569ea3d476a7e06a90abac0a25f414b185765
+++ sys/dev/apm/apm.c 04778f1116e92a03ba2ad10be1cdad7e04776d4f
@@ -102,7 +102,7 @@ static void apm_perror(const char *, int
static void apm_periodic_check(struct apm_softc *);
static void apm_thread(void *);
static void apm_perror(const char *, int, ...)
- __attribute__((__format__(__printf__,1,3)));
+ __printflike(1,3);
#ifdef APM_POWER_PRINT
static void apm_power_print(struct apm_softc *, struct apm_power_info *);
#endif
============================================================
--- sys/dev/hpc/apm/apmdev.c d1d3dde7923f67a42f9b74762f606217a6f8f81c
+++ sys/dev/hpc/apm/apmdev.c 93bff2c7b17233dc2502000e22d1973794b6bdbf
@@ -128,7 +128,7 @@ static void apm_perror(const char *, int
static void apm_periodic_check(struct apm_softc *);
static void apm_thread(void *);
static void apm_perror(const char *, int, ...)
- __attribute__((__format__(__printf__,1,3)));
+ __printflike(1,3);
#ifdef APM_POWER_PRINT
static void apm_power_print(struct apm_softc *, struct apm_power_info *);
#endif
============================================================
--- sys/dev/ic/ath_netbsd.h f530156bc5b6df597191fd39e81c1eaa38b30018
+++ sys/dev/ic/ath_netbsd.h 87f19ea4594430fe6f51dcaab4f8b3ca5b7e6a11
@@ -120,7 +120,7 @@ extern void device_printf(device_t, cons
CTL_EOL)
extern void device_printf(device_t, const char *fmt, ...)
- __attribute__((__format__(__printf__,2,3)));
+ __printflike(2,3);
const struct sysctlnode *ath_sysctl_treetop(struct sysctllog **);
const struct sysctlnode *ath_sysctl_instance(const char *, struct sysctllog **);
============================================================
--- sys/dev/scsipi/ses.c 8de9a8d52cfeea49afb2c853c1df1f2756795153
+++ sys/dev/scsipi/ses.c 4f35923acd31137ed44f7a6ea17e4e0d27dcec1f
@@ -144,7 +144,7 @@ static void ses_log(struct ses_softc *,
static int ses_runcmd(struct ses_softc *, char *, int, char *, int *);
static void ses_log(struct ses_softc *, const char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
/*
* General NetBSD kernel stuff.
============================================================
--- sys/kern/kern_runq.c 4c3e1f79a743b9e0c93ea244ad997553e68e2799
+++ sys/kern/kern_runq.c d89963586dc3ab8e95357c4409f84936e4e25bde
@@ -829,7 +829,7 @@ sched_print_runqueue(void (*pr)(const ch
void
sched_print_runqueue(void (*pr)(const char *, ...)
- __attribute__((__format__(__printf__,1,2))))
+ __printflike(1,2))
{
runqueue_t *ci_rq;
struct cpu_info *ci, *tci;
============================================================
--- sys/kern/tty.c 15917aa59a7ecd476b6fbd10c0b93520a8ea209f
+++ sys/kern/tty.c 5828ce4539ea81e028b0609bc935942f85f65209
@@ -97,7 +97,7 @@ static void ttyprintf_nolock(struct tty
static void ttyecho(int, struct tty *);
static void ttyrubo(struct tty *, int);
static void ttyprintf_nolock(struct tty *, const char *fmt, ...)
- __attribute__((__format__(__printf__,2,3)));
+ __printflike(2,3);
static int proc_compare(struct proc *, struct proc *);
static void ttysigintr(void *);
============================================================
--- sys/lib/libsa/stand.h 1f3af2f36634961cd82c1c1a6e936cf24c30795e
+++ sys/lib/libsa/stand.h 01c09fcd6739b4acff733144670fa07bed019874
@@ -219,17 +219,17 @@ void printf(const char *, ...)
int dkcksum(const struct disklabel *);
void printf(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
int sprintf(char *, const char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
int snprintf(char *, size_t, const char *, ...)
- __attribute__((__format__(__printf__, 3, 4)));
+ __printflike(3,4);
void vprintf(const char *, _BSD_VA_LIST_)
- __attribute__((__format__(__printf__, 1, 0)));
+ __printflike(1,0);
int vsprintf(char *, const char *, _BSD_VA_LIST_)
- __attribute__((__format__(__printf__, 2, 0)));
+ __printflike(2,0);
int vsnprintf(char *, size_t, const char *, _BSD_VA_LIST_)
- __attribute__((__format__(__printf__, 3, 0)));
+ __printflike(3,0);
void twiddle(void);
void gets(char *);
int getfile(char *prompt, int mode);
============================================================
--- sys/net/agr/ieee8023ad_lacp_debug.h 0279dfe1e629e49242c3e10c548d781729c9c345
+++ sys/net/agr/ieee8023ad_lacp_debug.h fc9055589c4fa813374f79326fbe011c2ba6c0af
@@ -60,7 +60,7 @@ void lacp_dprintf(const struct lacp_port
#if defined(LACP_DEBUG)
extern int lacpdebug;
void lacp_dprintf(const struct lacp_port *, const char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
#define LACP_DPRINTF(a) if (lacpdebug) lacp_dprintf a
#else
#define LACP_DPRINTF(a) /* nothing */
============================================================
--- sys/net/zlib.h 532cf196fe24629cfa55fb69101430369fee6ba9
+++ sys/net/zlib.h ca56f6da787ee9697c6b4d321a1820d93357d8fb
@@ -1013,7 +1013,7 @@ ZEXTERN int ZEXPORTVA gzprintf __P((gz
*/
ZEXTERN int ZEXPORTVA gzprintf __P((gzFile, const char *, ...))
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
/*
Converts, formats, and writes the args to the compressed file under
control of the format string, as in fprintf. gzprintf returns the number of
============================================================
--- sys/net80211/ieee80211_netbsd.h 7b701886d2f3a96d636f26d37131f7a2a741832a
+++ sys/net80211/ieee80211_netbsd.h 837696a27b0aec84afbe8ce5504194ea6038e1b5
@@ -38,7 +38,7 @@ void if_printf(struct ifnet *, const cha
} while (/*CONSTCOND*/0)
void if_printf(struct ifnet *, const char *, ...)
- __attribute__((__format__(__printf__,2,3)));
+ __printflike(2,3);
#define IEEE80211_LOCK_INIT_IMPL(_ic, _name, _member) \
mutex_init(&(_ic)->_member, MUTEX_DEFAULT, IPL_NET)
============================================================
--- sys/sys/kthread.h 1e5ac9154f2e21e4568576e0aeb08d796769518f
+++ sys/sys/kthread.h 250ff184e230049729776f560c0e44b9d09eb78e
@@ -47,7 +47,7 @@ int kthread_create(pri_t, int, struct cp
int kthread_create(pri_t, int, struct cpu_info *,
void (*)(void *), void *,
lwp_t **, const char *, ...)
- __attribute__((__format__(__printf__,7,8)));
+ __printflike(7,8);
void kthread_exit(int) __dead;
void kthread_destroy(lwp_t *);
#endif /* _KERNEL */
============================================================
--- sys/sys/syslog.h 05fb6f1728ede76fdc84818fcbcfcb7a5ba0dff8
+++ sys/sys/syslog.h 25b8264f244c335641eafb3c070856f6f5a391e7
@@ -201,15 +201,15 @@ void syslog(int, const char *, ...)
void openlog(const char *, int, int);
int setlogmask(int);
void syslog(int, const char *, ...)
- __attribute__((__format__(__printf__,2,3)));
+ __printflike(2,3);
#if defined(_NETBSD_SOURCE)
void vsyslog(int, const char *, _BSD_VA_LIST_)
- __attribute__((__format__(__printf__,2,0)));
+ __printflike(2,0);
void closelog_r(struct syslog_data *);
void openlog_r(const char *, int, int, struct syslog_data *);
int setlogmask_r(int, struct syslog_data *);
void syslog_r(int, struct syslog_data *, const char *, ...)
- __attribute__((__format__(__printf__,3,4)));
+ __printflike(3,4);
void vsyslog_r(int, struct syslog_data *, const char *, _BSD_VA_LIST_);
#endif
__END_DECLS
@@ -218,11 +218,11 @@ void log(int, const char *, ...)
void logpri(int);
void log(int, const char *, ...)
- __attribute__((__format__(__printf__,2,3)));
+ __printflike(2,3);
void vlog(int, const char *, _BSD_VA_LIST_)
- __attribute__((__format__(__printf__,2,0)));
+ __printflike(2,0);
void addlog(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
+ __printflike(1,2);
void logwakeup(void);
#endif /* !_KERNEL */
============================================================
--- sys/sys/systm.h 73ee0f2ab13ea2cceab07be34c75bbab0f2de981
+++ sys/sys/systm.h 6aba60245a7d168b8a64770ae25078e42058c005
@@ -159,56 +159,56 @@ void aprint_normal(const char *, ...)
int sys_nosys(struct lwp *, const void *, register_t *);
void aprint_normal(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
+ __printflike(1,2);
void aprint_error(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
+ __printflike(1,2);
void aprint_naive(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
+ __printflike(1,2);
void aprint_verbose(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
+ __printflike(1,2);
void aprint_debug(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
+ __printflike(1,2);
struct device;
void aprint_normal_dev(struct device *, const char *, ...)
- __attribute__((__format__(__printf__,2,3)));
+ __printflike(2,3);
void aprint_error_dev(struct device *, const char *, ...)
- __attribute__((__format__(__printf__,2,3)));
+ __printflike(2,3);
void aprint_naive_dev(struct device *, const char *, ...)
- __attribute__((__format__(__printf__,2,3)));
+ __printflike(2,3);
void aprint_verbose_dev(struct device *, const char *, ...)
- __attribute__((__format__(__printf__,2,3)));
+ __printflike(2,3);
void aprint_debug_dev(struct device *, const char *, ...)
- __attribute__((__format__(__printf__,2,3)));
+ __printflike(2,3);
struct ifnet;
void aprint_normal_ifnet(struct ifnet *, const char *, ...)
- __attribute__((__format__(__printf__,2,3)));
+ __printflike(2,3);
void aprint_error_ifnet(struct ifnet *, const char *, ...)
- __attribute__((__format__(__printf__,2,3)));
+ __printflike(2,3);
void aprint_naive_ifnet(struct ifnet *, const char *, ...)
- __attribute__((__format__(__printf__,2,3)));
+ __printflike(2,3);
void aprint_verbose_ifnet(struct ifnet *, const char *, ...)
- __attribute__((__format__(__printf__,2,3)));
+ __printflike(2,3);
void aprint_debug_ifnet(struct ifnet *, const char *, ...)
- __attribute__((__format__(__printf__,2,3)));
+ __printflike(2,3);
int aprint_get_error_count(void);
void printf_tolog(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
+ __printflike(1,2);
void printf_nolog(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
+ __printflike(1,2);
void printf(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
+ __printflike(1,2);
int sprintf(char *, const char *, ...)
- __attribute__((__format__(__printf__,2,3)));
+ __printflike(2,3);
int snprintf(char *, size_t, const char *, ...)
- __attribute__((__format__(__printf__,3,4)));
+ __printflike(3,4);
void vprintf(const char *, _BSD_VA_LIST_);
int vsprintf(char *, const char *, _BSD_VA_LIST_);
int vsnprintf(char *, size_t, const char *, _BSD_VA_LIST_);
@@ -218,13 +218,13 @@ void panic(const char *, ...)
#endif /* _KERNEL */
void panic(const char *, ...)
- __attribute__((__noreturn__,__format__(__printf__,1,2)));
+ __attribute__((__noreturn__)) __printflike(1,2);
void uprintf(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
+ __printflike(1,2);
void uprintf_locked(const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
+ __printflike(1,2);
void ttyprintf(struct tty *, const char *, ...)
- __attribute__((__format__(__printf__,2,3)));
+ __printflike(2,3);
char *bitmask_snprintf(u_quad_t, const char *, char *, size_t);
============================================================
--- sys/sys/tprintf.h 52cfe79e2656556e744f32f67de8b9f19b5da4e5
+++ sys/sys/tprintf.h 2f71f42b5d128696449135378d6127ff1d102d85
@@ -40,6 +40,6 @@ void tprintf(tpr_t, const char *fmt, ...
void tprintf_close(tpr_t);
void tprintf(tpr_t, const char *fmt, ...)
- __attribute__((__format__(__printf__,2,3)));
+ __printflike(2,3);
#endif /* _SYS_TPRINTF_H_ */
============================================================
--- sys/ufs/ffs/ffs_subr.c 4bbbc8cd7883e4aa98a655f95a60d827974e7ad7
+++ sys/ufs/ffs/ffs_subr.c fcc4ddb2ad43d73166f219e35403d88606195ec7
@@ -51,7 +51,7 @@ void panic(const char *, ...)
#ifndef _KERNEL
#include <ufs/ufs/dinode.h>
void panic(const char *, ...)
- __attribute__((__noreturn__,__format__(__printf__,1,2)));
+ __attribute__((__noreturn__)) __printflike(1,2);
#else /* _KERNEL */
#include <sys/systm.h>
============================================================
--- tools/compat/compat_defs.h ffd42659df49983b5736fed1a632a15199e4b426
+++ tools/compat/compat_defs.h c6560c0ff684c0ae4dccb218aa2b6b5985faddbd
@@ -113,6 +113,10 @@ struct passwd;
#define __restrict
#undef __unused
#define __unused
+#undef __printflike
+#define __printflike(a,b)
+#undef __scanflike
+#define __scanflike(a,b)
/* Dirent support. */
============================================================
--- usr.bin/compress/compress.c 047358717edc88190061892296cf0bae10d05d8b
+++ usr.bin/compress/compress.c 43fb2df67a0b09f7fd92cd6e7ad6d751154ba767
@@ -56,8 +56,8 @@ void compress(char *, char *, int);
#include <unistd.h>
void compress(char *, char *, int);
-void cwarn(const char *, ...) __attribute__((__format__(__printf__,1,2)));
-void cwarnx(const char *, ...) __attribute__((__format__(__printf__,1,2)));
+void cwarn(const char *, ...) __printflike(1,2);
+void cwarnx(const char *, ...) __printflike(1,2);
void decompress(char *, char *, int);
int permission(char *);
void setfile(char *, struct stat *);
============================================================
--- usr.bin/config/defs.h 859c2d00cf8b302017224e040f77007c4f51edfa
+++ usr.bin/config/defs.h 240854977149ce05e5a670887e6fa2af6eb03d14
@@ -542,15 +542,15 @@ void cfgwarn(const char *, ...) /* imm
void prefix_pop(void);
char *sourcepath(const char *);
void cfgwarn(const char *, ...) /* immediate warns */
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void cfgxwarn(const char *, int, const char *, ...) /* delayed warns */
- __attribute__((__format__(__printf__, 3, 4)));
+ __printflike(3,4);
void cfgerror(const char *, ...) /* immediate errs */
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void cfgxerror(const char *, int, const char *, ...) /* delayed errs */
- __attribute__((__format__(__printf__, 3, 4)));
+ __printflike(3,4);
__dead void panic(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
struct nvlist *newnv(const char *, const char *, void *, int, struct nvlist *);
void nvfree(struct nvlist *);
void nvfreel(struct nvlist *);
============================================================
--- usr.bin/config/util.c a45f8fb30c3a3fb39f38e84d4117415b4ffcaba3
+++ usr.bin/config/util.c be84c513426bcdc3c65319ca6821f95f3a0a49fd
@@ -55,11 +55,11 @@ static void cfgvxerror(const char *, int
#include "defs.h"
static void cfgvxerror(const char *, int, const char *, va_list)
- __attribute__((__format__(__printf__, 3, 0)));
+ __printflike(3,0);
static void cfgvxwarn(const char *, int, const char *, va_list)
- __attribute__((__format__(__printf__, 3, 0)));
+ __printflike(3,0);
static void cfgvxmsg(const char *, int, const char *, const char *, va_list)
- __attribute__((__format__(__printf__, 4, 0)));
+ __printflike(4,0);
/*
* Push a prefix onto the prefix stack.
============================================================
--- usr.bin/ftp/extern.h 91394aa217babc6950034bda10d611b2df4204fc
+++ usr.bin/ftp/extern.h f01e4bdc0bc6d99baf8d7179501e81996f67ef51
@@ -111,7 +111,7 @@ int command(const char *, ...)
void cmdtimeout(int);
void cmdscanner(void);
int command(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
#ifndef NO_EDITCOMPLETE
unsigned char complete(EditLine *, int);
void controlediting(void);
============================================================
--- usr.bin/gzip/gzip.c e2693305716c3bf66037b6177e881fe91b9019ad
+++ usr.bin/gzip/gzip.c c5f03d92f82ce94a95a161590b65216a26301d93
@@ -165,15 +165,15 @@ static void maybe_err(const char *fmt, .
static char *infile; /* name of file coming in */
static void maybe_err(const char *fmt, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
#ifndef NO_BZIP2_SUPPORT
static void maybe_errx(const char *fmt, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
#endif
static void maybe_warn(const char *fmt, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
static void maybe_warnx(const char *fmt, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
static enum filetype file_gettype(u_char *);
#ifdef SMALL
#define gz_compress(if, of, sz, fn, tm) gz_compress(if, of, sz)
============================================================
--- usr.bin/menuc/defs.h 4d2f901ab16d4a2368e7c87b7497a108611a39fe
+++ usr.bin/menuc/defs.h ae5322a30e053e3b051719000ff4fdc01272e2ea
@@ -82,7 +82,7 @@ void yyerror(const char *, ...)
/* From util.c */
void yyerror(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void buff_add_ch(char);
char *buff_copy(void);
============================================================
--- usr.bin/patch/util.h bf758bd86cc321218ae7611b90c336c981e3b2c3
+++ usr.bin/patch/util.h 52a97e3156d39806d57381aaa06c4391d45ac9cb
@@ -28,13 +28,13 @@ void say(const char *, ...)
void *xrealloc(void *, size_t);
char *xstrdup(const char *);
void say(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void fatal(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void pfatal(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void ask(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void set_signals(int);
void ignore_signals(void);
void makedirs(char *, bool);
============================================================
--- usr.bin/rdist/defs.h c260c0a779c480c264c126e730a768b575cb07a5
+++ usr.bin/rdist/defs.h c49a2f5d7d67d738a4c92cab519f4e949ac7896c
@@ -155,19 +155,19 @@ void error(const char *, ...)
void define(char *);
void docmds(char **, int, char **);
void error(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2))) ;
+ __printflike(1,2) ;
int except(char *);
struct namelist *
expand(struct namelist *, int);
char *exptilde(char [], char *);
void fatal(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
int inlist(struct namelist *, char *);
void insert(char *,
struct namelist *, struct namelist *, struct subcmd *);
void install(char *, char *, int, int);
void dolog(FILE *, const char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
struct namelist *
lookup(char *, int, struct namelist *);
void lostconn(int);
============================================================
--- usr.bin/rdist/server.c 57d9400f4921be0f5063be6d424ed312552bf4aa
+++ usr.bin/rdist/server.c 8c2b2fc3647bbeb23150ef581cdbd089fb1b3f0e
@@ -73,7 +73,7 @@ static void note(const char *, ...)
static int fchtogm(int, char *, time_t, char *, char *, mode_t);
static void hardlink(char *);
static void note(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
static void query(char *);
static void recvf(char *, int);
static void removeit(struct stat *);
============================================================
--- usr.bin/rs/rs.c 6a9efe78073c9b5e76439b8551f15c3e2ff37cd8
+++ usr.bin/rs/rs.c 781238b281acd378971120ff8d6f15a90c0d71c6
@@ -94,7 +94,7 @@ void usage __P((char *, ...))
int owidth = 80, gutter = 2;
void usage __P((char *, ...))
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void getargs __P((int, char *[]));
void getfile __P((void));
int getline __P((void));
============================================================
--- usr.bin/sed/extern.h 2819fb54387b3660ae7e9a7a2fa12107d8476116
+++ usr.bin/sed/extern.h b213924f7f262de2604651d1bed19b3ba57371aa
@@ -89,7 +89,7 @@ void err(int, const char *, ...)
void cspace(SPACE *, char *, size_t, enum e_spflag);
char *cu_fgets(char *, int);
void err(int, const char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
int mf_fgets(SPACE *, enum e_spflag);
void process(void);
char *strregerror(int, regex_t *);
============================================================
--- usr.bin/systat/extern.h f4d0dcd8002d40da68ecfbc71282931ff65415c2
+++ usr.bin/systat/extern.h fcd075dbedb70f19976533f70a040c492ea236de
@@ -94,7 +94,7 @@ void error(const char *, ...)
void disks_drives(char *);
void display(int);
void error(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void fetchbufcache(void);
void fetchdf(void);
void fetchicmp(void);
============================================================
--- usr.bin/tail/extern.h 2e389212c5218bb1fa7ac9047e6a4440bb313a80
+++ usr.bin/tail/extern.h 2eaed5f0ed545f5de7e6ba0a0a9ed92608ef6328
@@ -44,7 +44,7 @@ void err(int fatal, const char *fmt, ...
int lines(FILE *, off_t);
void err(int fatal, const char *fmt, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
void ierr(void);
void oerr(void);
============================================================
--- usr.bin/vi/include/com_extern.h 7deaa4ff4646ca0d553d2fd1941ecc60b611db41
+++ usr.bin/vi/include/com_extern.h 58b5d427d68c4055da1c9bb6221dbdbd2e97051f
@@ -128,7 +128,7 @@ void msgq __P((SCR *, mtype_t, const cha
int mark_set __P((SCR *, ARG_CHAR_T, MARK *, int));
int mark_insdel __P((SCR *, lnop_t, recno_t));
void msgq __P((SCR *, mtype_t, const char *, ...))
- __attribute__((__format__(__printf__, 3, 4)));
+ __printflike(3,4);
void msgq_str __P((SCR *, mtype_t, const char *, const char *));
void mod_rpt __P((SCR *));
void msgq_status __P((SCR *, recno_t, u_int));
============================================================
--- usr.bin/vi/include/ex_extern.h 5aadb2e32fda20e5c8b2a00806be5a15010cdc4f
+++ usr.bin/vi/include/ex_extern.h 4f66f020f62374729dc3056a705a05dcefe1acc7
@@ -62,7 +62,7 @@ int ex_printf __P((SCR *, const char *,
int ex_ldisplay __P((SCR *, const char *, size_t, size_t, u_int));
int ex_scprint __P((SCR *, MARK *, MARK *));
int ex_printf __P((SCR *, const char *, ...))
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
int ex_puts __P((SCR *, const char *));
int ex_fflush __P((SCR *sp));
int ex_put __P((SCR *, EXCMD *));
============================================================
--- usr.bin/xlint/lint1/externs1.h 6c1dafabdc550171116bb33f92eac0399320b35a
+++ usr.bin/xlint/lint1/externs1.h cfb3f96528cdb678b09735a37219bccbb2e609d0
@@ -122,7 +122,7 @@ extern void lerror(const char *, int, co
extern int gnuism(int, ...);
extern int c99ism(int, ...);
extern void lerror(const char *, int, const char *, ...)
- __attribute__((__noreturn__,__format__(__printf__, 3, 4)));
+ __attribute__((__noreturn__)) __printflike(3,4);
/*
* decl.c
============================================================
--- usr.sbin/bootp/common/report.h 977d620930f3d22fd49d10833048f845bf3f0e42
+++ usr.sbin/bootp/common/report.h f1d12cff398baec222e9e022d61dfc75aaeb6220
@@ -4,5 +4,5 @@ extern void report(int, const char *, ..
extern void report_init(int);
extern void report(int, const char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
extern const char *get_errmsg(void);
============================================================
--- usr.sbin/faithd/faithd.c b4fe684988e68e508623139bd9d4af5d2de02346
+++ usr.sbin/faithd/faithd.c 6acc3ebaeeaae35bc3daef43feb793c7547e368f
@@ -105,7 +105,7 @@ static void exit_stderr __P((const char
static void sig_terminate __P((int));
static void start_daemon __P((void));
static void exit_stderr __P((const char *, ...))
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
static void grab_myaddrs __P((void));
static void free_myaddrs __P((void));
static void update_myaddrs __P((void));
============================================================
--- usr.sbin/faithd/faithd.h 529ddd8f523468a195c5f4982d69bb4c96ceabde
+++ usr.sbin/faithd/faithd.h 8a8706c46290123c7090f65b41f2e24e2e1dd974
@@ -38,9 +38,9 @@ extern void exit_success __P((const char
extern int ftp_active __P((int, int, int *, int *));
extern int ftp_passive __P((int, int, int *, int *));
extern void exit_success __P((const char *, ...))
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
extern void exit_failure __P((const char *, ...))
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
#define DEFAULT_PORT_NAME "telnet"
#define DEFAULT_DIR "/usr/libexec"
============================================================
--- usr.sbin/gspa/gspa/gsp_ass.h 8c5e1d82c5fd2f8b2bea0f832f6a8e6990838414
+++ usr.sbin/gspa/gspa/gsp_ass.h d369c564ee0854627adbd6a4fcb8fb8c93482756
@@ -145,9 +145,9 @@ void p1err(char *fmt, ...)
symbol lookup(char *id, bool makeit);
expr num_expr(int);
void p1err(char *fmt, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void perr(char *fmt, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void pseudo(int code, operand operands);
void push_input(char *fn);
void putcode(u_int16_t *, int);
============================================================
--- usr.sbin/lpr/common_source/lp.h 3ed2591bbcbc3abc87055a96db2fe5cfaec607f3
+++ usr.sbin/lpr/common_source/lp.h 67dc50c7432b62833088a93f0f25d6e5d12ecca7
@@ -106,7 +106,7 @@ void fatal(const char *, ...)
void displayq(int);
void dump(const char *, const char *, int);
void fatal(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
int getline(FILE *);
const char *gethost(const char *);
int getport(const char *);
============================================================
--- usr.sbin/lpr/lpd/printjob.c 4b251b33e1db5450cd567d733c6e55302d4febae
+++ usr.sbin/lpr/lpd/printjob.c 835b46e4aaee7176f2d9241ef8422a8d7b260a1e
@@ -131,7 +131,7 @@ static void pstatus(const char *, ...)
static int print(int, char *);
static int printit(char *);
static void pstatus(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
static char response(void);
static void scan_out(int, char *, int);
static char *scnline(int, char *, int);
============================================================
--- usr.sbin/lpr/lpd/recvjob.c 2996c600d72a9ab39e79e9ded7ad94157136bd6d
+++ usr.sbin/lpr/lpd/recvjob.c 236034223213c568e083ab302e492447a67dc822
@@ -75,7 +75,7 @@ static void frecverr(const char *,
static int chksize(int);
static void frecverr(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
static int noresponse(void);
static void rcleanup(int);
static int read_number(const char *);
============================================================
--- usr.sbin/lpr/lpr/lpr.c 6809a2fde3e38df2fe1c25fd7e0af5ba25047d5a
+++ usr.sbin/lpr/lpr/lpr.c bd2c3a4b86f591ebbe4f15399ae7dc96f594eae1
@@ -108,7 +108,7 @@ static void fatal2(const char *, ...)
static void cleanup(int);
static void copy(int, const char *);
static void fatal2(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2),__noreturn__));
+ __printflike(1,2) __attribute__((__noreturn__));
static char *itoa(int);
static const char *linked(const char *);
static char *lmktemp(const char *, int, int);
============================================================
--- usr.sbin/makefs/ffs/ffs_extern.h 6526c76c7cd263a8a695f021066ac1949d90761e
+++ usr.sbin/makefs/ffs/ffs_extern.h 783bad79b06389b2c2f473c68dc416fc98add288
@@ -46,7 +46,7 @@ void panic(const char *, ...)
/* ffs.c */
void panic(const char *, ...)
- __attribute__((__noreturn__,__format__(__printf__,1,2)));
+ __attribute__((__noreturn__)) __printflike(1,2);
/* ffs_alloc.c */
int ffs_alloc(struct inode *, daddr_t, daddr_t, int, daddr_t *);
============================================================
--- usr.sbin/map-mbone/mapper.c 7ec0f3e194efc28035938db783f73abe44d1c2d3
+++ usr.sbin/map-mbone/mapper.c a0d09361329d49b23a0c77a4f9c589d9486c201e
@@ -104,7 +104,7 @@ void logit(int severity, int syserr, con
u_int32_t host_addr(char *name);
void logit(int severity, int syserr, const char *format, ...)
- __attribute__((__format__(__printf__, 3, 4)));
+ __printflike(3,4);
Node *find_node(u_int32_t addr, Node **ptr)
{
============================================================
--- usr.sbin/mopd/common/log.h 5e8f4c2c3421bef1f15faae518b5b86ae81decc3
+++ usr.sbin/mopd/common/log.h 30dda14b39c5c9116910df85806d6769281544ce
@@ -35,13 +35,13 @@ void mopLogErr __P((const char *, ...))
__BEGIN_DECLS
extern int mopInteractive;
void mopLogErr __P((const char *, ...))
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void mopLogErrX __P((const char *, ...))
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void mopLogWarn __P((const char *, ...))
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void mopLogWarnX __P((const char *, ...))
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
__END_DECLS
#endif /* _LOG_H_ */
============================================================
--- usr.sbin/mrouted/defs.h 3bac5e492504d5d89b773fa85afa88545fc1df86
+++ usr.sbin/mrouted/defs.h e77b1328b61a65e1438ec4d8e3ce93b4e141c01e
@@ -144,7 +144,7 @@ extern void logit(int, int, const char
/* main.c */
extern void logit(int, int, const char *, ...)
- __attribute__((__format__(__printf__, 3, 4)));
+ __printflike(3,4);
extern int register_input_handler(int fd, ihfunc_t func);
/* igmp.c */
============================================================
--- usr.sbin/mrouted/main.c c81cc706d9074a15e01cf7dffcfba62e377a49b8
+++ usr.sbin/mrouted/main.c 00c5b14ea6e364ed09ec0c8a74e1985d551f089a
@@ -77,7 +77,7 @@ void logit(int severity, int syserr, con
/* To shut up gcc -Wstrict-prototypes */
int main(int argc, char *argv[]);
void logit(int severity, int syserr, const char *format, ...)
- __attribute__((__format__(__printf__, 3, 4)));
+ __printflike(3,4);
int
register_input_handler(int fd, ihfunc_t func)
============================================================
--- usr.sbin/mtree/create.c 4de64d5be3479eb6a12482ff216eee9a284499b9
+++ usr.sbin/mtree/create.c 7a4760d76b845696a4e9567fad1bb5bffa1a2f0c
@@ -85,7 +85,7 @@ static void output(int *, const char *,
static int dcmp(const FTSENT **, const FTSENT **);
static void output(int *, const char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
static int statd(FTS *, FTSENT *, uid_t *, gid_t *, mode_t *, u_long *);
static void statf(FTSENT *);
============================================================
--- usr.sbin/mtree/extern.h 0aeb7590c14a79696c2362714fb1ddb7367e6c5a
+++ usr.sbin/mtree/extern.h 16d5c914376292884c1c0d9a6193f950411cb761
@@ -61,7 +61,7 @@ void mtree_err(const char *, ...)
void init_excludes(void);
int matchtags(NODE *);
void mtree_err(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
const char *nodetype(u_int);
u_int parsekey(const char *, int *);
void parsetags(slist_t *, char *);
============================================================
--- usr.sbin/rarpd/rarpd.c 4892d335d6c7a8a0cf490b24d23926dec259b935
+++ usr.sbin/rarpd/rarpd.c b6442d4615336cba149739693f1bbf846b25b3c3
@@ -93,7 +93,7 @@ void debug(const char *,...)
u_int32_t choose_ipaddr(u_int32_t **, u_int32_t, u_int32_t);
void debug(const char *,...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void init_some(char *name);
void init_one(char *, u_int32_t);
u_int32_t ipaddrtonetmask(u_int32_t);
@@ -106,7 +106,7 @@ void rarperr(int, const char *,...)
void rarp_reply(struct if_info *, struct ether_header *, u_int32_t,
struct hostent *);
void rarperr(int, const char *,...)
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
#if defined(__NetBSD__)
#include "mkarp.h"
============================================================
--- usr.sbin/route6d/route6d.c 5b340dd9b712e733114af9151dabc216a4661f07
+++ usr.sbin/route6d/route6d.c f31705be8a1f8769346cc9894520d4f7347d0a20
@@ -268,11 +268,11 @@ void fatal(const char *, ...)
int ripinterval(int);
time_t ripsuptrig(void);
void fatal(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void trace(int, const char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
void tracet(int, const char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
unsigned int
if_maxindex(void);
struct ifc *
============================================================
--- usr.sbin/rtsold/rtsold.h d1e06a057e626d48c52619159e3cf40d373a48fb
+++ usr.sbin/rtsold/rtsold.h c6395f91d400fb9ad07844691dc7739f1b37b981
@@ -69,7 +69,7 @@ extern void warnmsg __P((int, const char
struct ifinfo *find_ifinfo __P((int));
void rtsol_timer_update __P((struct ifinfo *));
extern void warnmsg __P((int, const char *, const char *, ...))
- __attribute__((__format__(__printf__, 3, 4)));
+ __printflike(3,4);
extern char **autoifprobe __P((void));
/* if.c */
============================================================
--- usr.sbin/sup/source/supextern.h 5b4789034ad2e5baf1dd621a925e1f81e3bf4099
+++ usr.sbin/sup/source/supextern.h 4de89bb2fefa0c0ffb10d14265728763fb837fc0
@@ -20,16 +20,16 @@ void logquit(int, char *, ...)
/* log.c */
void logopen(char *);
void logquit(int, char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
void logerr(char *, ...)
- __attribute__((__format__(__printf__, 1, 2))) ;
+ __printflike(1,2) ;
void loginfo(char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
#ifdef LIBWRAP
void logdeny(char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void logallow(char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
#endif
/* netcryptvoid.c */
@@ -46,7 +46,7 @@ void quit(int, char *, ...)
/* quit.c */
void quit(int, char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
/* read_line.c */
char *read_line(FILE *, size_t *, size_t *, const char[3], int);
@@ -82,7 +82,7 @@ int scmerr(int, char *, ...)
int samehost(void);
int matchhost(char *);
int scmerr(int, char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
int byteswap(int);
/* scmio.c */
@@ -136,9 +136,9 @@ void done(int, char *, ...)
int copyfile(char *, char *);
void finishup(int);
void done(int, char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
void goaway(char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
/* supcmisc.c */
void prtime(void);
@@ -147,7 +147,7 @@ void notify(char *, ...)
int estabd(char *, char *);
void ugconvert(char *, char *, int *, int *, int *);
void notify(char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
void lockout(int);
char *fmttime(time_t);
============================================================
--- usr.sbin/user/user.c 493e14237d7d3189b3a1c0c71820eaa03196ce80
+++ usr.sbin/user/user.c b5dcef97c2e5b37c278e6c18c0c89ce5b72c00f2
@@ -200,7 +200,7 @@ static int asystem(const char *fmt, ...
#define UNSET_EXPIRY "Null (unset)"
static int asystem(const char *fmt, ...)
- __attribute__((__format__(__printf__, 1, 2)));
+ __printflike(1,2);
static int is_number(const char *);
static struct group *find_group_info(const char *);
static int verbose;
============================================================
--- usr.sbin/ypbind/ypbind.c c3e993694dda03b174c98a1749e0dd4d3b2b2550
+++ usr.sbin/ypbind/ypbind.c 13a605004bdb0b1a9cf0118dd553eb3e95569f63
@@ -125,7 +125,7 @@ static void yp_log(int, const char *, ..
static void usage(void);
static void yp_log(int, const char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+ __printflike(2,3);
static struct _dom_binding *makebinding(const char *);
static int makelock(struct _dom_binding *);
static void removelock(struct _dom_binding *);