gbranden pushed a commit to branch master
in repository groff.

commit b5256f84baa7c11c7f410955dbe768963860c51b
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat May 30 02:00:36 2026 -0500

    [libbib]: Fix -Wmissing-declarations GCC warning.
    
    * src/libs/libbib/common.cpp: Preprocessor-include "index.h" to make
      visible prototype of `hash()`.
---
 ChangeLog                  | 7 +++++++
 src/libs/libbib/common.cpp | 2 ++
 src/libs/libbib/index.cpp  | 2 +-
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 433d851d6..8be75df5e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2026-05-30  G. Branden Robinson <[email protected]>
+
+       * src/libs/libbib/common.cpp: Preprocessor-include "index.h" to
+       make visible prototype of `hash()`.
+
+       Fixes `-Wmissing-declarations` GCC warning.
+
 2026-05-30  G. Branden Robinson <[email protected]>
 
        * tmac/an.tmac: Trivially refactor.  Rename string `an-pageref`
diff --git a/src/libs/libbib/common.cpp b/src/libs/libbib/common.cpp
index fb819bc77..34a491c33 100644
--- a/src/libs/libbib/common.cpp
+++ b/src/libs/libbib/common.cpp
@@ -17,6 +17,8 @@ for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
+#include "index.h" // hash()
+
 unsigned hash(const char *s, int len)
 {
 #if 0
diff --git a/src/libs/libbib/index.cpp b/src/libs/libbib/index.cpp
index 0238bd3fd..4323270c7 100644
--- a/src/libs/libbib/index.cpp
+++ b/src/libs/libbib/index.cpp
@@ -35,7 +35,7 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>. */
 
 #include "refid.h"
 #include "search.h"
-#include "index.h"
+#include "index.h" // hash()
 #include "defs.h"
 
 #include "nonposix.h"

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to