From c25baea9cc473332b48e359cae15d9b25c21135b Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 15 Jan 2023 13:38:55 -0800 Subject: [PATCH] gvcolor: squash -Wmissing-prototypes warning --- cmd/tools/Makefile.am | 4 ++-- cmd/tools/colorxlate.h | 3 +++ cmd/tools/colxlate.c | 1 + cmd/tools/gvcolor.c | 3 +-- 4 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 cmd/tools/colorxlate.h diff --git a/cmd/tools/Makefile.am b/cmd/tools/Makefile.am index 123314965..560034494 100644 --- a/cmd/tools/Makefile.am +++ b/cmd/tools/Makefile.am @@ -10,7 +10,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/lib/common \ $(EXPAT_INCLUDES) -noinst_HEADERS = colortbl.h convert.h mmio.h matrix_market.h \ +noinst_HEADERS = colortbl.h colorxlate.h convert.h mmio.h matrix_market.h \ graph_generator.h gml2gv.h gmlparse.h openFile.h if ENABLE_STATIC bin_PROGRAMS = gc gvcolor gxl2gv acyclic nop ccomps sccmap tred \ @@ -118,7 +118,7 @@ nop_LDADD = \ $(top_builddir)/lib/cgraph/libcgraph.la -gvcolor_SOURCES = gvcolor.c colxlate.c colortbl.h +gvcolor_SOURCES = gvcolor.c colxlate.c colortbl.h colorxlate.h gvcolor_LDADD = \ $(top_builddir)/lib/ingraphs/libingraphs_C.la \ diff --git a/cmd/tools/colorxlate.h b/cmd/tools/colorxlate.h new file mode 100644 index 000000000..92bef4767 --- /dev/null +++ b/cmd/tools/colorxlate.h @@ -0,0 +1,3 @@ +#pragma once + +void colorxlate(char *str, char *buf); diff --git a/cmd/tools/colxlate.c b/cmd/tools/colxlate.c index f0d5538b2..99232dcd7 100644 --- a/cmd/tools/colxlate.c +++ b/cmd/tools/colxlate.c @@ -26,6 +26,7 @@ typedef struct hsbcolor_t { } hsbcolor_t; #include "colortbl.h" +#include "colorxlate.h" static char *canoncolor(const char *orig, char *out) { diff --git a/cmd/tools/gvcolor.c b/cmd/tools/gvcolor.c index 87eedeaa5..2f66e6831 100644 --- a/cmd/tools/gvcolor.c +++ b/cmd/tools/gvcolor.c @@ -26,6 +26,7 @@ #include #include #include +#include "colorxlate.h" #include #include typedef struct Agnodeinfo_t { @@ -50,8 +51,6 @@ int AdjustSaturation; double MinRankSaturation; double MaxRankSaturation; -extern void colorxlate(char *str, char *buf); - static int cmpf(Agnode_t ** n0, Agnode_t ** n1) { double relrank0 = ND_relrank(*n0); -- 2.40.0