From f2434d5b1256610fde4d3d8ce942fe06a1485f7d Mon Sep 17 00:00:00 2001 From: Steven Dee <steve@smartercode.net> Date: Sun, 7 Dec 2014 00:09:54 -0500 Subject: [PATCH] Move backend names into src/benchmark.c It's causing unreferenced-variable warnings, and isn't referenced anywhere aside from benchmark.c. If client code is likely to reference it, perhaps move it into another header, so people who include hammer.h don't have to refer to it to have warning-free code. --- src/benchmark.c | 8 ++++++++ src/hammer.h | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/benchmark.c b/src/benchmark.c index 408bfdb2..75595b23 100644 --- a/src/benchmark.c +++ b/src/benchmark.c @@ -14,6 +14,14 @@ #include <sys/resource.h> #endif +static const char* HParserBackendNames[] = { + "Packrat", + "Regular", + "LL(k)", + "LALR", + "GLR" +}; + void h_benchmark_clock_gettime(struct timespec *ts) { if (ts == NULL) return; diff --git a/src/hammer.h b/src/hammer.h index 52058b5c..b0ce75d2 100644 --- a/src/hammer.h +++ b/src/hammer.h @@ -46,14 +46,6 @@ typedef enum HParserBackend_ { PB_MAX = PB_GLR } HParserBackend; -static const char* HParserBackendNames[] = { - "Packrat", - "Regular", - "LL(k)", - "LALR", - "GLR" -}; - typedef enum HTokenType_ { // Before you change the explicit values of these, think of the poor bindings ;_; TT_NONE = 1, -- GitLab