Sun Nov 27 13:24:32 2011 UTC ()
Use __dead, not attribute noreturn.


(dholland)
diff -r1.39 -r1.40 src/usr.bin/quota/quota.c

cvs diff -r1.39 -r1.40 src/usr.bin/quota/quota.c (expand / switch to unified diff)

--- src/usr.bin/quota/quota.c 2011/11/27 13:23:50 1.39
+++ src/usr.bin/quota/quota.c 2011/11/27 13:24:32 1.40
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: quota.c,v 1.39 2011/11/27 13:23:50 dholland Exp $ */ 1/* $NetBSD: quota.c,v 1.40 2011/11/27 13:24:32 dholland Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1980, 1990, 1993 4 * Copyright (c) 1980, 1990, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to Berkeley by 7 * This code is derived from software contributed to Berkeley by
8 * Robert Elz at The University of Melbourne. 8 * Robert Elz at The University of Melbourne.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -32,27 +32,27 @@ @@ -32,27 +32,27 @@
32 * SUCH DAMAGE. 32 * SUCH DAMAGE.
33 */ 33 */
34 34
35#include <sys/cdefs.h> 35#include <sys/cdefs.h>
36#ifndef lint 36#ifndef lint
37__COPYRIGHT("@(#) Copyright (c) 1980, 1990, 1993\ 37__COPYRIGHT("@(#) Copyright (c) 1980, 1990, 1993\
38 The Regents of the University of California. All rights reserved."); 38 The Regents of the University of California. All rights reserved.");
39#endif /* not lint */ 39#endif /* not lint */
40 40
41#ifndef lint 41#ifndef lint
42#if 0 42#if 0
43static char sccsid[] = "@(#)quota.c 8.4 (Berkeley) 4/28/95"; 43static char sccsid[] = "@(#)quota.c 8.4 (Berkeley) 4/28/95";
44#else 44#else
45__RCSID("$NetBSD: quota.c,v 1.39 2011/11/27 13:23:50 dholland Exp $"); 45__RCSID("$NetBSD: quota.c,v 1.40 2011/11/27 13:24:32 dholland Exp $");
46#endif 46#endif
47#endif /* not lint */ 47#endif /* not lint */
48 48
49/* 49/*
50 * Disk quota reporting program. 50 * Disk quota reporting program.
51 */ 51 */
52#include <sys/param.h> 52#include <sys/param.h>
53#include <sys/types.h> 53#include <sys/types.h>
54#include <sys/file.h> 54#include <sys/file.h>
55#include <sys/stat.h> 55#include <sys/stat.h>
56#include <sys/mount.h> 56#include <sys/mount.h>
57#include <sys/socket.h> 57#include <sys/socket.h>
58 58
@@ -82,27 +82,27 @@ struct quotause { @@ -82,27 +82,27 @@ struct quotause {
82 struct quotaval qv[QUOTA_NLIMITS]; 82 struct quotaval qv[QUOTA_NLIMITS];
83 char fsname[MAXPATHLEN + 1]; 83 char fsname[MAXPATHLEN + 1];
84}; 84};
85#define FOUND 0x01 85#define FOUND 0x01
86#define QUOTA2 0x02 86#define QUOTA2 0x02
87 87
88static struct quotause *getprivs(id_t, int); 88static struct quotause *getprivs(id_t, int);
89static void heading(int, id_t, const char *, const char *); 89static void heading(int, id_t, const char *, const char *);
90static void showgid(gid_t); 90static void showgid(gid_t);
91static void showgrpname(const char *); 91static void showgrpname(const char *);
92static void showquotas(int, id_t, const char *); 92static void showquotas(int, id_t, const char *);
93static void showuid(uid_t); 93static void showuid(uid_t);
94static void showusrname(const char *); 94static void showusrname(const char *);
95static void usage(void) __attribute__((__noreturn__)); 95static void usage(void) __dead;
96 96
97static int qflag = 0; 97static int qflag = 0;
98static int vflag = 0; 98static int vflag = 0;
99static int hflag = 0; 99static int hflag = 0;
100static int dflag = 0; 100static int dflag = 0;
101static int Dflag = 0; 101static int Dflag = 0;
102static uid_t myuid; 102static uid_t myuid;
103 103
104int 104int
105main(int argc, char *argv[]) 105main(int argc, char *argv[])
106{ 106{
107 int ngroups;  107 int ngroups;
108 gid_t mygid, gidset[NGROUPS]; 108 gid_t mygid, gidset[NGROUPS];