groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 02/05: Minor compilation warnings.


From: Werner LEMBERG
Subject: [groff] 02/05: Minor compilation warnings.
Date: Wed, 28 Feb 2018 07:21:33 -0500 (EST)

wl pushed a commit to branch master
in repository groff.

commit b8c12a5a314b90bc12aeaa0ddd40f73b0bcef868
Author: Werner Lemberg <address@hidden>
Date:   Wed Feb 28 06:43:09 2018 +0100

    Minor compilation warnings.
    
    * src/devices/xditview/draw.c: Don't declare `MaxFontPosition'.
    
    * src/roff/troff/input.cpp (psbb_locator::context_args): Avoid
    shadowing of `buf'.
---
 ChangeLog                   | 9 +++++++++
 src/devices/xditview/draw.c | 3 ---
 src/roff/troff/input.cpp    | 6 +++---
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5e03001..476f169 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2018-02-28  Werner LEMBERG  <address@hidden>
 
+       Minor compilation warnings.
+
+       * src/devices/xditview/draw.c: Don't declare `MaxFontPosition'.
+
+       * src/roff/troff/input.cpp (psbb_locator::context_args): Avoid
+       shadowing of `buf'.
+
+2018-02-28  Werner LEMBERG  <address@hidden>
+
        * src/roff/troff/env.cpp: s/HYPHEN_/HYPHEN_NOT/ for clarification.
 
 2018-02-26  Bertrand Garrigues <address@hidden>
diff --git a/src/devices/xditview/draw.c b/src/devices/xditview/draw.c
index 6126179..288d98a 100644
--- a/src/devices/xditview/draw.c
+++ b/src/devices/xditview/draw.c
@@ -31,9 +31,6 @@
 /* forward reference */
 static int FakeCharacter(DviWidget, char *, int);
 
-/* font.c */
-extern int MaxFontPosition(DviWidget);
-
 /* shadowed by a macro definition in parse.c, and unused elsewhere */
 #if 0
 static void
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 8a5041d..6df9c31 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -6273,16 +6273,16 @@ inline const char *psbb_locator::context_args(const 
char *tag)
 //
 // Inputs:
 //   tag   literal text to be matched at start of buffer
-//   buf   pointer to text to be checked for "tag" match
+//   p     pointer to text to be checked for "tag" match
 //
 // Returns a pointer to the trailing substring of the specified
 // text buffer, following an initial substring matching the "tag"
 // argument, or NULL if "tag" is not matched.
 //
-inline const char *psbb_locator::context_args(const char *tag, const char *buf)
+inline const char *psbb_locator::context_args(const char *tag, const char *p)
 {
   size_t len = strlen(tag);
-  return (strncmp(tag, buf, len) == 0) ? buf + len : NULL;
+  return (strncmp(tag, p, len) == 0) ? p + len : NULL;
 }
 
 // psbb_locator::bounding_box_args()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]