From: John Ellson Date: Tue, 21 Oct 2014 10:13:17 +0000 (-0400) Subject: apply compilation warnings patch from mirraz1@rambler.ru (bug#2377) X-Git-Tag: TRAVIS_CI_BUILD_EXPERIMENTAL~154 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fc448254ee89a08cf97f58153d3fd2b5418f40fc;p=graphviz apply compilation warnings patch from mirraz1@rambler.ru (bug#2377) --- diff --git a/lib/dotgen2/level.c b/lib/dotgen2/level.c index 3845cd97e..babef7761 100644 --- a/lib/dotgen2/level.c +++ b/lib/dotgen2/level.c @@ -19,6 +19,8 @@ #define STRONG_CLUSTER_WEIGHT 1000 #define NORANK 6 +extern void rank2(graph_t * g, int balance, int maxiter, int searchsize); + static int is_a_strong_cluster(graph_t * g); static void compile_samerank(graph_t * ug, graph_t * parent_clust); static int is_internal_to_cluster(edge_t * e); diff --git a/lib/gvpr/actions.c b/lib/gvpr/actions.c index f0ba9232c..cb079ada4 100644 --- a/lib/gvpr/actions.c +++ b/lib/gvpr/actions.c @@ -1045,7 +1045,6 @@ static char* resolveColor (char* str) #undef S -static int colorxlate(char *str, gvcolor_t * color, color_type_t target_type) { static hsvrgbacolor_t *last; diff --git a/lib/gvpr/actions.h b/lib/gvpr/actions.h index 514a64a4c..55083347e 100644 --- a/lib/gvpr/actions.h +++ b/lib/gvpr/actions.h @@ -20,6 +20,7 @@ extern "C" { #include "cgraph.h" #include "expr.h" +#include "color.h" extern void nodeInduce(Agraph_t * selected); extern Agobj_t *clone(Agraph_t * g, Agobj_t * obj); @@ -49,6 +50,7 @@ extern "C" { extern char *toLower(Expr_t * pgm, char *, Sfio_t*); extern char *toUpper(Expr_t * pgm, char *, Sfio_t*); extern int deleteObj(Agraph_t * g, Agobj_t * obj); + extern int colorxlate(char *str, gvcolor_t * color, color_type_t target_type); extern char *colorx (Expr_t* ex, char* incolor, char* fmt, Sfio_t* fp); extern void gvstart_timer(void); extern double gvelapsed_sec(void); diff --git a/lib/sfio/sfhdr.h b/lib/sfio/sfhdr.h index ad371f7aa..5e9be9d73 100644 --- a/lib/sfio/sfhdr.h +++ b/lib/sfio/sfhdr.h @@ -493,13 +493,13 @@ extern "C" { #include #define SFSETLOCALE(decimal,thousand) \ { struct lconv* lv; \ - if(*(decimal) == 0) \ - { *(decimal) = '.'; \ + if((decimal) == 0) \ + { (decimal) = '.'; \ if((lv = localeconv())) \ { if(lv->decimal_point && lv->decimal_point[0]) \ - *(decimal) = lv->decimal_point[0]; \ - if(thousand != NULL && lv->thousands_sep && lv->thousands_sep[0]) \ - *(thousand) = lv->thousands_sep[0]; \ + (decimal) = lv->decimal_point[0]; \ + if(lv->thousands_sep && lv->thousands_sep[0]) \ + (thousand) = lv->thousands_sep[0]; \ } \ } \ } diff --git a/lib/sfio/sfstrtod.c b/lib/sfio/sfstrtod.c index a77321084..d3fec778a 100644 --- a/lib/sfio/sfstrtod.c +++ b/lib/sfio/sfstrtod.c @@ -75,8 +75,8 @@ char **retp; /* to return the remainder of string */ reg int mode, fexp, sign, expsign; Sfdouble_t dval; #if _lib_locale - int decpoint = 0; - SFSETLOCALE(&decpoint, NIL(int *)); + char decpoint = 0, thousand; + SFSETLOCALE(decpoint, thousand); #else #define decpoint '.' #endif diff --git a/lib/sfio/sftable.c b/lib/sfio/sftable.c index 394bac1f8..55d0f31ab 100644 --- a/lib/sfio/sftable.c +++ b/lib/sfio/sftable.c @@ -46,7 +46,8 @@ int type; int base, fmt, flags, dot, width, precis; ssize_t n_str, size = 0; char *t_str, *sp; - int v, n, skip, dollar, decimal, thousand; + int v, n, skip, dollar; + char decimal, thousand; Sffmt_t *ft, savft; Fmtpos_t *fp; /* position array of arguments */ int argp, argn, maxp, need[FP_INDEX]; @@ -56,7 +57,8 @@ int type; else if (!(fp = sffmtpos(f, form, args, -1))) return NIL(Fmtpos_t *); - dollar = decimal = thousand = 0; + dollar = 0; + decimal = thousand = 0; argn = maxp = -1; while ((n = *form)) { if (n != '%') { /* collect the non-pattern chars */ @@ -150,7 +152,7 @@ int type; flags |= SFFMT_ALTER; goto loop_flags; case QUOTE: - SFSETLOCALE(&decimal, &thousand); + SFSETLOCALE(decimal, thousand); if (thousand) flags |= SFFMT_THOUSAND; goto loop_flags; diff --git a/lib/sfio/sfvprintf.c b/lib/sfio/sfvprintf.c index 132146b08..520cd6f48 100644 --- a/lib/sfio/sfvprintf.c +++ b/lib/sfio/sfvprintf.c @@ -60,7 +60,7 @@ va_list args; /* arg list if !argf */ #define SLACK 1024 char buf[SF_MAXDIGITS + SLACK], data[SF_GRAIN]; - int decimal = 0, thousand = 0; + char decimal = 0, thousand = 0; /* fast io system */ reg uchar *d, *endd; @@ -218,7 +218,7 @@ va_list args; /* arg list if !argf */ flags |= SFFMT_ALTER; goto loop_flags; case QUOTE: - SFSETLOCALE(&decimal, &thousand); + SFSETLOCALE(decimal, thousand); if (thousand) flags |= SFFMT_THOUSAND; goto loop_flags; @@ -869,7 +869,7 @@ va_list args; /* arg list if !argf */ sp = endsp = buf + 1; /* reserve space for sign */ *endsp++ = *ep ? *ep++ : '0'; - SFSETLOCALE(&decimal, &thousand); + SFSETLOCALE(decimal, thousand); if (precis > 0 || (flags & SFFMT_ALTER)) *endsp++ = decimal; ssp = endsp; @@ -912,7 +912,7 @@ va_list args; /* arg list if !argf */ goto end_efg; } - SFSETLOCALE(&decimal, &thousand); + SFSETLOCALE(decimal, thousand); endsp = sp = buf + 1; /* save a space for sign */ endep = ep + decpt; if (decpt > 3 && (flags & SFFMT_THOUSAND)) { diff --git a/plugin/core/Makefile.am b/plugin/core/Makefile.am index 59c991ef1..9b9209892 100644 --- a/plugin/core/Makefile.am +++ b/plugin/core/Makefile.am @@ -8,6 +8,11 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/lib/gvc \ -I$(top_srcdir)/lib/cgraph \ -I$(top_srcdir)/lib/cdt \ + -I$(top_srcdir)/lib/gvpr \ + -I$(top_srcdir)/lib/expr \ + -I$(top_srcdir)/lib/ast \ + -I$(top_srcdir)/lib/sfio \ + -I$(top_srcdir)/lib/vmalloc \ $(LIBGVC_CFLAGS) noinst_LTLIBRARIES = libgvplugin_core_C.la diff --git a/plugin/core/gvrender_core_pic.c b/plugin/core/gvrender_core_pic.c index 4ba1b0e76..be35e158e 100644 --- a/plugin/core/gvrender_core_pic.c +++ b/plugin/core/gvrender_core_pic.c @@ -26,6 +26,7 @@ #include "agxbuf.h" #include "utils.h" #include "color.h" +#include "actions.h" #include "const.h"