Tue Mar 30 14:58:17 2021 UTC ()
make: remove workaround for bug in lint

The bug has been fixed in lint.

No functional change.


(rillig)
diff -r1.893 -r1.894 src/usr.bin/make/var.c

cvs diff -r1.893 -r1.894 src/usr.bin/make/var.c (expand / switch to unified diff)

--- src/usr.bin/make/var.c 2021/03/21 23:03:33 1.893
+++ src/usr.bin/make/var.c 2021/03/30 14:58:17 1.894
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: var.c,v 1.893 2021/03/21 23:03:33 rillig Exp $ */ 1/* $NetBSD: var.c,v 1.894 2021/03/30 14:58:17 rillig Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1988, 1989, 1990, 1993 4 * Copyright (c) 1988, 1989, 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 * Adam de Boor. 8 * Adam de Boor.
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.
@@ -130,27 +130,27 @@ @@ -130,27 +130,27 @@
130#include <regex.h> 130#include <regex.h>
131#endif 131#endif
132#include <errno.h> 132#include <errno.h>
133#include <inttypes.h> 133#include <inttypes.h>
134#include <limits.h> 134#include <limits.h>
135#include <time.h> 135#include <time.h>
136 136
137#include "make.h" 137#include "make.h"
138#include "dir.h" 138#include "dir.h"
139#include "job.h" 139#include "job.h"
140#include "metachar.h" 140#include "metachar.h"
141 141
142/* "@(#)var.c 8.3 (Berkeley) 3/19/94" */ 142/* "@(#)var.c 8.3 (Berkeley) 3/19/94" */
143MAKE_RCSID("$NetBSD: var.c,v 1.893 2021/03/21 23:03:33 rillig Exp $"); 143MAKE_RCSID("$NetBSD: var.c,v 1.894 2021/03/30 14:58:17 rillig Exp $");
144 144
145typedef enum VarFlags { 145typedef enum VarFlags {
146 VFL_NONE = 0, 146 VFL_NONE = 0,
147 147
148 /* 148 /*
149 * The variable's value is currently being used by Var_Parse or 149 * The variable's value is currently being used by Var_Parse or
150 * Var_Subst. This marker is used to avoid endless recursion. 150 * Var_Subst. This marker is used to avoid endless recursion.
151 */ 151 */
152 VFL_IN_USE = 1 << 0, 152 VFL_IN_USE = 1 << 0,
153 153
154 /* 154 /*
155 * The variable comes from the environment. 155 * The variable comes from the environment.
156 * These variables are not registered in any GNode, therefore they 156 * These variables are not registered in any GNode, therefore they
@@ -4332,32 +4332,27 @@ Var_Parse(const char **pp, GNode *scope, @@ -4332,32 +4332,27 @@ Var_Parse(const char **pp, GNode *scope,
4332 /* Ending character if variable in parens or braces. */ 4332 /* Ending character if variable in parens or braces. */
4333 char endc; 4333 char endc;
4334 /* 4334 /*
4335 * TRUE if the variable is local and we're expanding it in a 4335 * TRUE if the variable is local and we're expanding it in a
4336 * non-local scope. This is done to support dynamic sources. 4336 * non-local scope. This is done to support dynamic sources.
4337 * The result is just the expression, unaltered. 4337 * The result is just the expression, unaltered.
4338 */ 4338 */
4339 Boolean dynamic; 4339 Boolean dynamic;
4340 const char *extramodifiers; 4340 const char *extramodifiers;
4341 Var *v; 4341 Var *v;
4342 4342
4343 Expr expr = { 4343 Expr expr = {
4344 NULL, 4344 NULL,
4345#if defined(lint) 
4346 /* NetBSD lint cannot fully parse C99 struct initializers. */ 
4347 { NULL, NULL }, 
4348#else 
4349 FStr_InitRefer(NULL), 4345 FStr_InitRefer(NULL),
4350#endif 
4351 eflags, 4346 eflags,
4352 scope, 4347 scope,
4353 DEF_REGULAR 4348 DEF_REGULAR
4354 }; 4349 };
4355 4350
4356 DEBUG2(VAR, "Var_Parse: %s (%s)\n", start, 4351 DEBUG2(VAR, "Var_Parse: %s (%s)\n", start,
4357 VarEvalFlags_ToString(eflags)); 4352 VarEvalFlags_ToString(eflags));
4358 4353
4359 *out_val = FStr_InitRefer(NULL); 4354 *out_val = FStr_InitRefer(NULL);
4360 extramodifiers = NULL; /* extra modifiers to apply first */ 4355 extramodifiers = NULL; /* extra modifiers to apply first */
4361 dynamic = FALSE; 4356 dynamic = FALSE;
4362 4357
4363 /* 4358 /*