diff options
| author | Tom Lane | 2017-02-19 18:04:30 +0000 |
|---|---|---|
| committer | Tom Lane | 2017-02-19 18:04:30 +0000 |
| commit | 65d508fd4decee4d5a54c1e7b93acd25d5e80556 (patch) | |
| tree | da36765eb2d4088ec5e331f688d6ae29d44963c2 /src/fe_utils | |
| parent | a3dc8e495b4967fe07086a700d115c89f4f0add0 (diff) | |
Suppress "unused variable" warnings with older versions of flex.
Versions of flex before 2.5.36 might generate code that results in an
"unused variable" warning, when using %option reentrant. Historically
we've worked around that by specifying -Wno-error, but that's an
unsatisfying solution. The official "fix" for this was just to insert a
dummy reference to the variable, so write a small perl script that edits
the generated C code similarly.
The MSVC side of this is untested, but the buildfarm should soon reveal
if I broke that.
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/fe_utils')
| -rw-r--r-- | src/fe_utils/Makefile | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/fe_utils/Makefile b/src/fe_utils/Makefile index 2565924411c..ebce38ceb45 100644 --- a/src/fe_utils/Makefile +++ b/src/fe_utils/Makefile @@ -29,11 +29,7 @@ libpgfeutils.a: $(OBJS) psqlscan.c: FLEXFLAGS = -Cfe -p -p psqlscan.c: FLEX_NO_BACKUP=yes - -# Latest flex causes warnings in this file. -ifeq ($(GCC),yes) -psqlscan.o: CFLAGS += -Wno-error -endif +psqlscan.c: FLEX_FIX_WARNING=yes distprep: psqlscan.c |
