diff options
author | Werner LEMBERG <wl@gnu.org> | 2012-03-10 09:16:02 +0000 |
---|---|---|
committer | Werner LEMBERG <wl@gnu.org> | 2012-03-10 09:16:02 +0000 |
commit | 5e05f82697e0e45cbf7662cfd0cb8ef542a0f34e (patch) | |
tree | 3d098e3fc09d1bfd42014345b0cea5e288807650 /src | |
parent | 52142625cc79c89b2bbc74bad438b12d1f2bed09 (diff) | |
download | groff-git-5e05f82697e0e45cbf7662cfd0cb8ef542a0f34e.tar.gz |
Fix compiler warnings.
* src/preproc/html/pre-html.cpp (alterDeviceTo): Avoid ambiguous
if-else clause.
* src/preproc/grn/main.cpp (sccsid): Comment out.
* src/roff/troff/number.cpp (parse_expr) <case '*'>: Add cast.
* src/devices/xditview/Makefile.sub (EXTRA_CFLAGS): Add `-Dlint' so
that unused static ID arrays don't cause a warning.
(Some) problems reported by Bjarni Ingi Gislason
<bjarniig@rhi.hi.is>.
Diffstat (limited to 'src')
-rw-r--r-- | src/devices/xditview/Makefile.sub | 2 | ||||
-rw-r--r-- | src/preproc/grn/main.cpp | 2 | ||||
-rw-r--r-- | src/preproc/html/pre-html.cpp | 5 | ||||
-rw-r--r-- | src/roff/troff/number.cpp | 4 |
4 files changed, 7 insertions, 6 deletions
diff --git a/src/devices/xditview/Makefile.sub b/src/devices/xditview/Makefile.sub index f19584472..927807ef6 100644 --- a/src/devices/xditview/Makefile.sub +++ b/src/devices/xditview/Makefile.sub @@ -2,7 +2,7 @@ PROG=gxditview$(EXEEXT) MAN1=gxditview.n MLIB=$(LIBM) XLIBS=$(LIBXUTIL) -EXTRA_CFLAGS=$(X_CFLAGS) +EXTRA_CFLAGS=$(X_CFLAGS) -Dlint EXTRA_LDFLAGS=$(X_LIBS) $(X_PRE_LIBS) -lXaw -lXmu -lXt -lX11 $(X_EXTRA_LIBS) OBJS=\ device.$(OBJEXT) \ diff --git a/src/preproc/grn/main.cpp b/src/preproc/grn/main.cpp index 401109ad6..d6ae7543f 100644 --- a/src/preproc/grn/main.cpp +++ b/src/preproc/grn/main.cpp @@ -119,7 +119,7 @@ extern POINT *PTMakePoint(double x, double y, POINT **pplist); #define BIG 999999999999.0 /* unweildly large floating number */ -static char sccsid[] = "@(#) (Berkeley) 8/5/85, 12/28/99"; +/* static char sccsid[] = "@(#) (Berkeley) 8/5/85, 12/28/99"; */ int res; /* the printer's resolution goes here */ diff --git a/src/preproc/html/pre-html.cpp b/src/preproc/html/pre-html.cpp index 50c2de5e9..fae164cd0 100644 --- a/src/preproc/html/pre-html.cpp +++ b/src/preproc/html/pre-html.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2000, 2001, 2002, 2003, 2004, 2007, 2008, 2009 +/* Copyright (C) 2000-2004, 2007-2009, 2012 * Free Software Foundation, Inc. * Written by Gaius Mulley (gaius@glam.ac.uk). * @@ -1205,11 +1205,12 @@ static void alterDeviceTo(int argc, char *argv[], int toImage) } else { while (i < argc) { - if (strcmp(argv[i], IMAGE_DEVICE) == 0) + if (strcmp(argv[i], IMAGE_DEVICE) == 0) { if (dialect == xhtml) argv[i] = (char *)"-Txhtml"; else argv[i] = (char *)"-Thtml"; + } i++; } argv[troff_arg] = (char *)"groff"; /* use groff -Z */ diff --git a/src/roff/troff/number.cpp b/src/roff/troff/number.cpp index fc3f9803a..1f4c6ee5b 100644 --- a/src/roff/troff/number.cpp +++ b/src/roff/troff/number.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2004, 2009 +/* Copyright (C) 1989-1992, 2001, 2002, 2004, 2009, 2012 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -355,7 +355,7 @@ static int parse_expr(units *v, int scale_indicator, case '*': if (v2 < 0) { if (*v > 0) { - if (*v > -(unsigned)INT_MIN / -(unsigned)v2) + if ((unsigned)*v > -(unsigned)INT_MIN / -(unsigned)v2) overflow = 1; } else if (-(unsigned)*v > INT_MAX / -(unsigned)v2) |