Deleted Added
full compact
decl.c (91592) decl.c (108470)
1/* $NetBSD: decl.c,v 1.29 2002/01/18 21:01:39 thorpej Exp $ */
2
3/*
4 * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
5 * Copyright (c) 1994, 1995 Jochen Pohl
6 * All Rights Reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 22 unchanged lines hidden (view full) ---

31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35#include <sys/cdefs.h>
36#if defined(__RCSID) && !defined(lint)
37__RCSID("$NetBSD: decl.c,v 1.29 2002/01/18 21:01:39 thorpej Exp $");
38#endif
1/* $NetBSD: decl.c,v 1.29 2002/01/18 21:01:39 thorpej Exp $ */
2
3/*
4 * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
5 * Copyright (c) 1994, 1995 Jochen Pohl
6 * All Rights Reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 22 unchanged lines hidden (view full) ---

31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35#include <sys/cdefs.h>
36#if defined(__RCSID) && !defined(lint)
37__RCSID("$NetBSD: decl.c,v 1.29 2002/01/18 21:01:39 thorpej Exp $");
38#endif
39__FBSDID("$FreeBSD: head/usr.bin/xlint/lint1/decl.c 91592 2002-03-03 15:12:50Z markm $");
39__FBSDID("$FreeBSD: head/usr.bin/xlint/lint1/decl.c 108470 2002-12-30 21:18:15Z schweikh $");
40
41#include <sys/param.h>
42#include <limits.h>
43#include <stdlib.h>
44#include <string.h>
45
46#include "lint1.h"
47

--- 2957 unchanged lines hidden (view full) ---

3005
3006static void
3007glchksz(sym_t *sym)
3008{
3009
3010 if (sym->s_def == TDEF) {
3011 if (sym->s_type->t_tspec == FUNC)
3012 /*
40
41#include <sys/param.h>
42#include <limits.h>
43#include <stdlib.h>
44#include <string.h>
45
46#include "lint1.h"
47

--- 2957 unchanged lines hidden (view full) ---

3005
3006static void
3007glchksz(sym_t *sym)
3008{
3009
3010 if (sym->s_def == TDEF) {
3011 if (sym->s_type->t_tspec == FUNC)
3012 /*
3013 * this can happen if an syntax error occurred
3013 * this can happen if a syntax error occurred
3014 * after a function declaration
3015 */
3016 return;
3017 STRUCT_ASSIGN(curr_pos, sym->s_dpos);
3018 if (length(sym->s_type, sym->s_name) == 0 &&
3019 sym->s_type->t_tspec == ARRAY && sym->s_type->t_dim == 0) {
3020 /* empty array declaration: %s */
3021 if (tflag || (sym->s_scl == EXTERN && !sflag)) {

--- 32 unchanged lines hidden ---
3014 * after a function declaration
3015 */
3016 return;
3017 STRUCT_ASSIGN(curr_pos, sym->s_dpos);
3018 if (length(sym->s_type, sym->s_name) == 0 &&
3019 sym->s_type->t_tspec == ARRAY && sym->s_type->t_dim == 0) {
3020 /* empty array declaration: %s */
3021 if (tflag || (sym->s_scl == EXTERN && !sflag)) {

--- 32 unchanged lines hidden ---