1
0

006-compilation-warnings.patch 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737
  1. --- a/clean_exit.c
  2. +++ b/clean_exit.c
  3. @@ -9,10 +9,11 @@
  4. */
  5. #ifndef lint
  6. -static char sccsid[] = "@(#) clean_exit.c 1.4 94/12/28 17:42:19";
  7. +static char sccsid[] __attribute__((__unused__)) = "@(#) clean_exit.c 1.4 94/12/28 17:42:19";
  8. #endif
  9. #include <stdio.h>
  10. +#include <unistd.h>
  11. extern void exit();
  12. --- a/diag.c
  13. +++ b/diag.c
  14. @@ -10,7 +10,7 @@
  15. */
  16. #ifndef lint
  17. -static char sccsid[] = "@(#) diag.c 1.1 94/12/28 17:42:20";
  18. +static char sccsid[] __attribute__((__unused__)) = "@(#) diag.c 1.1 94/12/28 17:42:20";
  19. #endif
  20. /* System libraries */
  21. --- a/eval.c
  22. +++ b/eval.c
  23. @@ -19,7 +19,7 @@
  24. */
  25. #ifndef lint
  26. -static char sccsid[] = "@(#) eval.c 1.3 95/01/30 19:51:45";
  27. +static char sccsid[] __attribute__((__unused__)) = "@(#) eval.c 1.3 95/01/30 19:51:45";
  28. #endif
  29. /* System libraries. */
  30. --- a/fakelog.c
  31. +++ b/fakelog.c
  32. @@ -6,7 +6,7 @@
  33. */
  34. #ifndef lint
  35. -static char sccsid[] = "@(#) fakelog.c 1.3 94/12/28 17:42:21";
  36. +static char sccsid[] __attribute__((__unused__)) = "@(#) fakelog.c 1.3 94/12/28 17:42:21";
  37. #endif
  38. #include <stdio.h>
  39. @@ -17,7 +17,7 @@ static char sccsid[] = "@(#) fakelog.c 1
  40. /* ARGSUSED */
  41. -openlog(name, logopt, facility)
  42. +void openlog(name, logopt, facility)
  43. char *name;
  44. int logopt;
  45. int facility;
  46. @@ -27,7 +27,7 @@ int facility;
  47. /* vsyslog - format one record */
  48. -vsyslog(severity, fmt, ap)
  49. +void vsyslog(severity, fmt, ap)
  50. int severity;
  51. char *fmt;
  52. va_list ap;
  53. @@ -43,7 +43,7 @@ va_list ap;
  54. /* VARARGS */
  55. -VARARGS(syslog, int, severity)
  56. +void VARARGS(syslog, int, severity)
  57. {
  58. va_list ap;
  59. char *fmt;
  60. @@ -56,7 +56,7 @@ VARARGS(syslog, int, severity)
  61. /* closelog - dummy */
  62. -closelog()
  63. +void closelog()
  64. {
  65. /* void */
  66. }
  67. --- a/fix_options.c
  68. +++ b/fix_options.c
  69. @@ -6,7 +6,7 @@
  70. */
  71. #ifndef lint
  72. -static char sccsid[] = "@(#) fix_options.c 1.6 97/04/08 02:29:19";
  73. +static char sccsid[] __attribute__((__unused__)) = "@(#) fix_options.c 1.6 97/04/08 02:29:19";
  74. #endif
  75. #include <sys/types.h>
  76. @@ -29,14 +29,14 @@ static char sccsid[] = "@(#) fix_options
  77. /* fix_options - get rid of IP-level socket options */
  78. -fix_options(request)
  79. -struct request_info *request;
  80. +void fix_options(request)
  81. +struct request_info *request;
  82. {
  83. #ifdef IP_OPTIONS
  84. unsigned char optbuf[BUFFER_SIZE / 3], *cp;
  85. char lbuf[BUFFER_SIZE], *lp;
  86. #if !defined(__GLIBC__)
  87. - int optsize = sizeof(optbuf), ipproto;
  88. + unsigned int optsize = sizeof(optbuf), ipproto;
  89. #else /* __GLIBC__ */
  90. size_t optsize = sizeof(optbuf);
  91. int ipproto;
  92. --- a/fromhost.c
  93. +++ b/fromhost.c
  94. @@ -11,7 +11,7 @@
  95. */
  96. #ifndef lint
  97. -static char sccsid[] = "@(#) fromhost.c 1.17 94/12/28 17:42:23";
  98. +static char sccsid[] __attribute__((__unused__)) = "@(#) fromhost.c 1.17 94/12/28 17:42:23";
  99. #endif
  100. #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT)
  101. --- a/hosts_access.c
  102. +++ b/hosts_access.c
  103. @@ -18,7 +18,7 @@
  104. */
  105. #ifndef lint
  106. -static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22";
  107. +static char sccsid[] __attribute__((__unused__)) = "@(#) hosts_access.c 1.21 97/02/12 02:13:22";
  108. #endif
  109. /* System libraries. */
  110. --- a/hosts_ctl.c
  111. +++ b/hosts_ctl.c
  112. @@ -12,7 +12,7 @@
  113. */
  114. #ifndef lint
  115. -static char sccsid[] = "@(#) hosts_ctl.c 1.4 94/12/28 17:42:27";
  116. +static char sccsid[] __attribute__((__unused__)) = "@(#) hosts_ctl.c 1.4 94/12/28 17:42:27";
  117. #endif
  118. #include <stdio.h>
  119. --- a/inetcf.c
  120. +++ b/inetcf.c
  121. @@ -6,7 +6,7 @@
  122. */
  123. #ifndef lint
  124. -static char sccsid[] = "@(#) inetcf.c 1.7 97/02/12 02:13:23";
  125. +static char sccsid[] __attribute__((__unused__)) = "@(#) inetcf.c 1.7 97/02/12 02:13:23";
  126. #endif
  127. #include <sys/types.h>
  128. @@ -14,6 +14,7 @@ static char sccsid[] = "@(#) inetcf.c 1.
  129. #include <stdio.h>
  130. #include <errno.h>
  131. #include <string.h>
  132. +#include <stdlib.h>
  133. extern int errno;
  134. extern void exit();
  135. @@ -21,6 +22,8 @@ extern void exit();
  136. #include "tcpd.h"
  137. #include "inetcf.h"
  138. +extern int check_path(char *, struct stat *);
  139. +
  140. /*
  141. * Network configuration files may live in unusual places. Here are some
  142. * guesses. Shorter names follow longer ones.
  143. --- a/misc.c
  144. +++ b/misc.c
  145. @@ -5,7 +5,7 @@
  146. */
  147. #ifndef lint
  148. -static char sccsic[] = "@(#) misc.c 1.2 96/02/11 17:01:29";
  149. +static char sccsid[] __attribute__((__unused__)) = "@(#) misc.c 1.2 96/02/11 17:01:29";
  150. #endif
  151. #include <sys/types.h>
  152. --- a/myvsyslog.c
  153. +++ b/myvsyslog.c
  154. @@ -8,7 +8,7 @@
  155. */
  156. #ifndef lint
  157. -static char sccsid[] = "@(#) myvsyslog.c 1.1 94/12/28 17:42:33";
  158. +static char sccsid[] __attribute__((__unused__)) = "@(#) myvsyslog.c 1.1 94/12/28 17:42:33";
  159. #endif
  160. #ifdef vsyslog
  161. --- a/options.c
  162. +++ b/options.c
  163. @@ -29,7 +29,7 @@
  164. */
  165. #ifndef lint
  166. -static char sccsid[] = "@(#) options.c 1.17 96/02/11 17:01:31";
  167. +static char sccsid[] __attribute__((__unused__)) = "@(#) options.c 1.17 96/02/11 17:01:31";
  168. #endif
  169. /* System libraries. */
  170. @@ -47,6 +47,8 @@ static char sccsid[] = "@(#) options.c 1
  171. #include <ctype.h>
  172. #include <setjmp.h>
  173. #include <string.h>
  174. +#include <stdlib.h>
  175. +#include <unistd.h>
  176. #ifndef MAXPATHNAMELEN
  177. #define MAXPATHNAMELEN BUFSIZ
  178. @@ -108,21 +110,21 @@ struct option {
  179. /* List of known keywords. Add yours here. */
  180. static struct option option_table[] = {
  181. - "user", user_option, NEED_ARG,
  182. - "group", group_option, NEED_ARG,
  183. - "umask", umask_option, NEED_ARG,
  184. - "linger", linger_option, NEED_ARG,
  185. - "keepalive", keepalive_option, 0,
  186. - "spawn", spawn_option, NEED_ARG | EXPAND_ARG,
  187. - "twist", twist_option, NEED_ARG | EXPAND_ARG | USE_LAST,
  188. - "rfc931", rfc931_option, OPT_ARG,
  189. - "setenv", setenv_option, NEED_ARG | EXPAND_ARG,
  190. - "nice", nice_option, OPT_ARG,
  191. - "severity", severity_option, NEED_ARG,
  192. - "allow", allow_option, USE_LAST,
  193. - "deny", deny_option, USE_LAST,
  194. - "banners", banners_option, NEED_ARG,
  195. - 0,
  196. + { "user", user_option, NEED_ARG },
  197. + { "group", group_option, NEED_ARG },
  198. + { "umask", umask_option, NEED_ARG },
  199. + { "linger", linger_option, NEED_ARG },
  200. + { "keepalive", keepalive_option, 0 },
  201. + { "spawn", spawn_option, NEED_ARG | EXPAND_ARG },
  202. + { "twist", twist_option, NEED_ARG | EXPAND_ARG | USE_LAST },
  203. + { "rfc931", rfc931_option, OPT_ARG },
  204. + { "setenv", setenv_option, NEED_ARG | EXPAND_ARG },
  205. + { "nice", nice_option, OPT_ARG },
  206. + { "severity", severity_option, NEED_ARG },
  207. + { "allow", allow_option, USE_LAST },
  208. + { "deny", deny_option, USE_LAST },
  209. + { "banners", banners_option, NEED_ARG },
  210. + { 0 },
  211. };
  212. /* process_options - process access control options */
  213. @@ -447,88 +449,88 @@ struct syslog_names {
  214. static struct syslog_names log_fac[] = {
  215. #ifdef LOG_KERN
  216. - "kern", LOG_KERN,
  217. + { "kern", LOG_KERN },
  218. #endif
  219. #ifdef LOG_USER
  220. - "user", LOG_USER,
  221. + { "user", LOG_USER },
  222. #endif
  223. #ifdef LOG_MAIL
  224. - "mail", LOG_MAIL,
  225. + { "mail", LOG_MAIL },
  226. #endif
  227. #ifdef LOG_DAEMON
  228. - "daemon", LOG_DAEMON,
  229. + { "daemon", LOG_DAEMON },
  230. #endif
  231. #ifdef LOG_AUTH
  232. - "auth", LOG_AUTH,
  233. + { "auth", LOG_AUTH },
  234. #endif
  235. #ifdef LOG_LPR
  236. - "lpr", LOG_LPR,
  237. + { "lpr", LOG_LPR },
  238. #endif
  239. #ifdef LOG_NEWS
  240. - "news", LOG_NEWS,
  241. + { "news", LOG_NEWS },
  242. #endif
  243. #ifdef LOG_UUCP
  244. - "uucp", LOG_UUCP,
  245. + { "uucp", LOG_UUCP },
  246. #endif
  247. #ifdef LOG_CRON
  248. - "cron", LOG_CRON,
  249. + { "cron", LOG_CRON },
  250. #endif
  251. #ifdef LOG_FTP
  252. - "ftp", LOG_FTP,
  253. + { "ftp", LOG_FTP },
  254. #endif
  255. #ifdef LOG_LOCAL0
  256. - "local0", LOG_LOCAL0,
  257. + { "local0", LOG_LOCAL0 },
  258. #endif
  259. #ifdef LOG_LOCAL1
  260. - "local1", LOG_LOCAL1,
  261. + { "local1", LOG_LOCAL1 },
  262. #endif
  263. #ifdef LOG_LOCAL2
  264. - "local2", LOG_LOCAL2,
  265. + { "local2", LOG_LOCAL2 },
  266. #endif
  267. #ifdef LOG_LOCAL3
  268. - "local3", LOG_LOCAL3,
  269. + { "local3", LOG_LOCAL3 },
  270. #endif
  271. #ifdef LOG_LOCAL4
  272. - "local4", LOG_LOCAL4,
  273. + { "local4", LOG_LOCAL4 },
  274. #endif
  275. #ifdef LOG_LOCAL5
  276. - "local5", LOG_LOCAL5,
  277. + { "local5", LOG_LOCAL5 },
  278. #endif
  279. #ifdef LOG_LOCAL6
  280. - "local6", LOG_LOCAL6,
  281. + { "local6", LOG_LOCAL6 },
  282. #endif
  283. #ifdef LOG_LOCAL7
  284. - "local7", LOG_LOCAL7,
  285. + { "local7", LOG_LOCAL7 },
  286. #endif
  287. - 0,
  288. + { 0 },
  289. };
  290. static struct syslog_names log_sev[] = {
  291. #ifdef LOG_EMERG
  292. - "emerg", LOG_EMERG,
  293. + { "emerg", LOG_EMERG },
  294. #endif
  295. #ifdef LOG_ALERT
  296. - "alert", LOG_ALERT,
  297. + { "alert", LOG_ALERT },
  298. #endif
  299. #ifdef LOG_CRIT
  300. - "crit", LOG_CRIT,
  301. + { "crit", LOG_CRIT },
  302. #endif
  303. #ifdef LOG_ERR
  304. - "err", LOG_ERR,
  305. + { "err", LOG_ERR },
  306. #endif
  307. #ifdef LOG_WARNING
  308. - "warning", LOG_WARNING,
  309. + { "warning", LOG_WARNING },
  310. #endif
  311. #ifdef LOG_NOTICE
  312. - "notice", LOG_NOTICE,
  313. + { "notice", LOG_NOTICE },
  314. #endif
  315. #ifdef LOG_INFO
  316. - "info", LOG_INFO,
  317. + { "info", LOG_INFO },
  318. #endif
  319. #ifdef LOG_DEBUG
  320. - "debug", LOG_DEBUG,
  321. + { "debug", LOG_DEBUG },
  322. #endif
  323. - 0,
  324. + { 0 },
  325. };
  326. /* severity_map - lookup facility or severity value */
  327. @@ -589,7 +591,7 @@ char *string;
  328. if (src[0] == 0)
  329. return (0);
  330. - while (ch = *src) {
  331. + while ((ch = *src)) {
  332. if (ch == ':') {
  333. if (*++src == 0)
  334. tcpd_warn("rule ends in \":\"");
  335. --- a/patchlevel.h
  336. +++ b/patchlevel.h
  337. @@ -1,3 +1,3 @@
  338. #ifndef lint
  339. -static char patchlevel[] = "@(#) patchlevel 7.6 97/03/21 19:27:23";
  340. +static char patchlevel[] __attribute__((__unused__)) = "@(#) patchlevel 7.6 97/03/21 19:27:23";
  341. #endif
  342. --- a/percent_m.c
  343. +++ b/percent_m.c
  344. @@ -5,7 +5,7 @@
  345. */
  346. #ifndef lint
  347. -static char sccsid[] = "@(#) percent_m.c 1.1 94/12/28 17:42:37";
  348. +static char sccsid[] __attribute__((__unused__)) = "@(#) percent_m.c 1.1 94/12/28 17:42:37";
  349. #endif
  350. #include <stdio.h>
  351. @@ -27,7 +27,7 @@ char *ibuf;
  352. char *bp = obuf;
  353. char *cp = ibuf;
  354. - while (*bp = *cp)
  355. + while ((*bp = *cp))
  356. if (*cp == '%' && cp[1] == 'm') {
  357. #ifdef HAVE_STRERROR
  358. strcpy(bp, strerror(errno));
  359. --- a/percent_x.c
  360. +++ b/percent_x.c
  361. @@ -11,7 +11,7 @@
  362. */
  363. #ifndef lint
  364. -static char sccsid[] = "@(#) percent_x.c 1.4 94/12/28 17:42:37";
  365. +static char sccsid[] __attribute__((__unused__)) = "@(#) percent_x.c 1.4 94/12/28 17:42:37";
  366. #endif
  367. /* System libraries. */
  368. @@ -19,6 +19,7 @@ static char sccsid[] = "@(#) percent_x.c
  369. #include <stdio.h>
  370. #include <syslog.h>
  371. #include <string.h>
  372. +#include <unistd.h>
  373. extern void exit();
  374. --- a/refuse.c
  375. +++ b/refuse.c
  376. @@ -8,7 +8,7 @@
  377. */
  378. #ifndef lint
  379. -static char sccsid[] = "@(#) refuse.c 1.5 94/12/28 17:42:39";
  380. +static char sccsid[] __attribute__((__unused__)) = "@(#) refuse.c 1.5 94/12/28 17:42:39";
  381. #endif
  382. /* System libraries. */
  383. --- a/rfc931.c
  384. +++ b/rfc931.c
  385. @@ -10,7 +10,7 @@
  386. */
  387. #ifndef lint
  388. -static char sccsid[] = "@(#) rfc931.c 1.10 95/01/02 16:11:34";
  389. +static char sccsid[] __attribute__((__unused__)) = "@(#) rfc931.c 1.10 95/01/02 16:11:34";
  390. #endif
  391. /* System libraries. */
  392. @@ -23,6 +23,7 @@ static char sccsid[] = "@(#) rfc931.c 1.
  393. #include <setjmp.h>
  394. #include <signal.h>
  395. #include <string.h>
  396. +#include <unistd.h>
  397. /* Local stuff. */
  398. @@ -152,7 +153,7 @@ char *dest;
  399. * protocol, not part of the data.
  400. */
  401. - if (cp = strchr(user, '\r'))
  402. + if ((cp = strchr(user, '\r')))
  403. *cp = 0;
  404. result = user;
  405. }
  406. --- a/safe_finger.c
  407. +++ b/safe_finger.c
  408. @@ -15,7 +15,7 @@
  409. */
  410. #ifndef lint
  411. -static char sccsid[] = "@(#) safe_finger.c 1.4 94/12/28 17:42:41";
  412. +static char sccsid[] __attribute__((__unused__)) = "@(#) safe_finger.c 1.4 94/12/28 17:42:41";
  413. #endif
  414. /* System libraries */
  415. @@ -27,6 +27,10 @@ static char sccsid[] = "@(#) safe_finger
  416. #include <ctype.h>
  417. #include <pwd.h>
  418. #include <syslog.h>
  419. +#include <fcntl.h>
  420. +#include <stdlib.h>
  421. +#include <sys/wait.h>
  422. +#include <unistd.h>
  423. extern void exit();
  424. @@ -45,6 +49,8 @@ int finger_pid;
  425. int allow_severity = SEVERITY;
  426. int deny_severity = LOG_WARNING;
  427. +int pipe_stdin();
  428. +
  429. void cleanup(sig)
  430. int sig;
  431. {
  432. @@ -52,7 +58,7 @@ int sig;
  433. exit(0);
  434. }
  435. -main(argc, argv)
  436. +int main(argc, argv)
  437. int argc;
  438. char **argv;
  439. {
  440. --- a/scaffold.c
  441. +++ b/scaffold.c
  442. @@ -5,7 +5,7 @@
  443. */
  444. #ifndef lint
  445. -static char sccs_id[] = "@(#) scaffold.c 1.6 97/03/21 19:27:24";
  446. +static char sccsid[] __attribute__((__unused__)) = "@(#) scaffold.c 1.6 97/03/21 19:27:24";
  447. #endif
  448. /* System libraries. */
  449. --- a/shell_cmd.c
  450. +++ b/shell_cmd.c
  451. @@ -9,7 +9,7 @@
  452. */
  453. #ifndef lint
  454. -static char sccsid[] = "@(#) shell_cmd.c 1.5 94/12/28 17:42:44";
  455. +static char sccsid[] __attribute__((__unused__)) = "@(#) shell_cmd.c 1.5 94/12/28 17:42:44";
  456. #endif
  457. /* System libraries. */
  458. @@ -20,6 +20,9 @@ static char sccsid[] = "@(#) shell_cmd.c
  459. #include <stdio.h>
  460. #include <syslog.h>
  461. #include <string.h>
  462. +#include <fcntl.h>
  463. +#include <sys/wait.h>
  464. +#include <unistd.h>
  465. extern void exit();
  466. --- a/socket.c
  467. +++ b/socket.c
  468. @@ -16,7 +16,7 @@
  469. */
  470. #ifndef lint
  471. -static char sccsid[] = "@(#) socket.c 1.15 97/03/21 19:27:24";
  472. +static char sccsid[] __attribute__((__unused__)) = "@(#) socket.c 1.15 97/03/21 19:27:24";
  473. #endif
  474. /* System libraries. */
  475. @@ -77,7 +77,7 @@ struct request_info *request;
  476. static struct sockaddr_in client;
  477. static struct sockaddr_in server;
  478. #if !defined (__GLIBC__)
  479. - int len;
  480. + unsigned int len;
  481. #else /* __GLIBC__ */
  482. size_t len;
  483. #endif /* __GLIBC__ */
  484. @@ -229,7 +229,7 @@ int fd;
  485. char buf[BUFSIZ];
  486. struct sockaddr_in sin;
  487. #if !defined(__GLIBC__)
  488. - int size = sizeof(sin);
  489. + unsigned int size = sizeof(sin);
  490. #else /* __GLIBC__ */
  491. size_t size = sizeof(sin);
  492. #endif /* __GLIBC__ */
  493. --- a/tcpd.c
  494. +++ b/tcpd.c
  495. @@ -11,7 +11,7 @@
  496. */
  497. #ifndef lint
  498. -static char sccsid[] = "@(#) tcpd.c 1.10 96/02/11 17:01:32";
  499. +static char sccsid[] __attribute__((__unused__)) = "@(#) tcpd.c 1.10 96/02/11 17:01:32";
  500. #endif
  501. /* System libraries. */
  502. @@ -24,6 +24,7 @@ static char sccsid[] = "@(#) tcpd.c 1.10
  503. #include <stdio.h>
  504. #include <syslog.h>
  505. #include <string.h>
  506. +#include <unistd.h>
  507. #ifndef MAXPATHNAMELEN
  508. #define MAXPATHNAMELEN BUFSIZ
  509. @@ -38,10 +39,12 @@ static char sccsid[] = "@(#) tcpd.c 1.10
  510. #include "patchlevel.h"
  511. #include "tcpd.h"
  512. +extern void fix_options(struct request_info *);
  513. +
  514. int allow_severity = SEVERITY; /* run-time adjustable */
  515. int deny_severity = LOG_WARNING; /* ditto */
  516. -main(argc, argv)
  517. +int main(argc, argv)
  518. int argc;
  519. char **argv;
  520. {
  521. --- a/tcpd.h
  522. +++ b/tcpd.h
  523. @@ -184,10 +184,10 @@ extern void tli_host __P((struct request
  524. #ifdef __STDC__
  525. extern void tcpd_warn(char *, ...); /* report problem and proceed */
  526. -extern void tcpd_jump(char *, ...); /* report problem and jump */
  527. +extern void tcpd_jump(char *, ...) __attribute__((__noreturn__)); /* report problem and jump */
  528. #else
  529. extern void tcpd_warn();
  530. -extern void tcpd_jump();
  531. +extern void tcpd_jump() __attribute__((__noreturn__));
  532. #endif
  533. struct tcpd_context {
  534. --- a/tcpdchk.c
  535. +++ b/tcpdchk.c
  536. @@ -15,7 +15,7 @@
  537. */
  538. #ifndef lint
  539. -static char sccsid[] = "@(#) tcpdchk.c 1.8 97/02/12 02:13:25";
  540. +static char sccsid[] __attribute__((__unused__)) = "@(#) tcpdchk.c 1.8 97/02/12 02:13:25";
  541. #endif
  542. /* System libraries. */
  543. @@ -30,6 +30,7 @@ static char sccsid[] = "@(#) tcpdchk.c 1
  544. #include <errno.h>
  545. #include <netdb.h>
  546. #include <string.h>
  547. +#include <unistd.h>
  548. extern int errno;
  549. extern void exit();
  550. @@ -199,13 +200,15 @@ struct request_info *request;
  551. char sv_list[BUFLEN]; /* becomes list of daemons */
  552. char *cl_list; /* becomes list of requests */
  553. char *sh_cmd; /* becomes optional shell command */
  554. +#ifndef PROCESS_OPTIONS
  555. char buf[BUFSIZ];
  556. +#endif
  557. int verdict;
  558. struct tcpd_context saved_context;
  559. saved_context = tcpd_context; /* stupid compilers */
  560. - if (fp = fopen(table, "r")) {
  561. + if ((fp = fopen(table, "r"))) {
  562. tcpd_context.file = table;
  563. tcpd_context.line = 0;
  564. while (xgets(sv_list, sizeof(sv_list), fp)) {
  565. @@ -331,7 +334,7 @@ char *list;
  566. clients = 0;
  567. } else {
  568. clients++;
  569. - if (host = split_at(cp + 1, '@')) { /* user@host */
  570. + if ((host = split_at(cp + 1, '@'))) { /* user@host */
  571. check_user(cp);
  572. check_host(host);
  573. } else {
  574. @@ -446,7 +449,7 @@ char *pat;
  575. } else if (errno != ENOENT) {
  576. tcpd_warn("open %s: %m", pat);
  577. }
  578. - } else if (mask = split_at(pat, '/')) { /* network/netmask */
  579. + } else if ((mask = split_at(pat, '/'))) { /* network/netmask */
  580. if (dot_quad_addr(pat) == INADDR_NONE
  581. || dot_quad_addr(mask) == INADDR_NONE)
  582. tcpd_warn("%s/%s: bad net/mask pattern", pat, mask);
  583. --- a/tcpdmatch.c
  584. +++ b/tcpdmatch.c
  585. @@ -14,7 +14,7 @@
  586. */
  587. #ifndef lint
  588. -static char sccsid[] = "@(#) tcpdmatch.c 1.5 96/02/11 17:01:36";
  589. +static char sccsid[] __attribute__((__unused__)) = "@(#) tcpdmatch.c 1.5 96/02/11 17:01:36";
  590. #endif
  591. /* System libraries. */
  592. @@ -29,6 +29,8 @@ static char sccsid[] = "@(#) tcpdmatch.c
  593. #include <syslog.h>
  594. #include <setjmp.h>
  595. #include <string.h>
  596. +#include <stdlib.h>
  597. +#include <unistd.h>
  598. extern void exit();
  599. extern int optind;
  600. --- a/tli.c
  601. +++ b/tli.c
  602. @@ -15,7 +15,7 @@
  603. */
  604. #ifndef lint
  605. -static char sccsid[] = "@(#) tli.c 1.15 97/03/21 19:27:25";
  606. +static char sccsid[] __attribute__((__unused__)) = "@(#) tli.c 1.15 97/03/21 19:27:25";
  607. #endif
  608. #ifdef TLI
  609. --- a/try-from.c
  610. +++ b/try-from.c
  611. @@ -11,7 +11,7 @@
  612. */
  613. #ifndef lint
  614. -static char sccsid[] = "@(#) try-from.c 1.2 94/12/28 17:42:55";
  615. +static char sccsid[] __attribute__((__unused__)) = "@(#) try-from.c 1.2 94/12/28 17:42:55";
  616. #endif
  617. /* System libraries. */
  618. @@ -37,7 +37,7 @@ static char sccsid[] = "@(#) try-from.c
  619. int allow_severity = SEVERITY; /* run-time adjustable */
  620. int deny_severity = LOG_WARNING; /* ditto */
  621. -main(argc, argv)
  622. +int main(argc, argv)
  623. int argc;
  624. char **argv;
  625. {
  626. --- a/update.c
  627. +++ b/update.c
  628. @@ -14,7 +14,7 @@
  629. */
  630. #ifndef lint
  631. -static char sccsid[] = "@(#) update.c 1.1 94/12/28 17:42:56";
  632. +static char sccsid[] __attribute__((__unused__)) = "@(#) update.c 1.1 94/12/28 17:42:56";
  633. #endif
  634. /* System libraries */
  635. @@ -22,6 +22,7 @@ static char sccsid[] = "@(#) update.c 1.
  636. #include <stdio.h>
  637. #include <syslog.h>
  638. #include <string.h>
  639. +#include <unistd.h>
  640. /* Local stuff. */