bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH] readtokens: this module *does* require xalloc.h


From: Jim Meyering
Subject: [PATCH] readtokens: this module *does* require xalloc.h
Date: Wed, 06 Jan 2010 08:40:27 +0100

I sync'd coreutils to use the latest from gnulib
and tried to build.  To my horror, I saw this:

  cc1: warnings being treated as errors
  readtokens.c: In function 'readtoken':
  readtokens.c:118: error: implicit declaration of function 'x2nrealloc' 
[-Wimplicit-function-declaration]
  readtokens.c:118: error: assignment makes pointer from integer without a cast
  readtokens.c: In function 'readtokens':
  readtokens.c:166: error: implicit declaration of function 'xnmalloc' 
[-Wimplicit-function-declaration]
  readtokens.c:166: error: assignment makes pointer from integer without a cast
  readtokens.c:167: error: assignment makes pointer from integer without a cast
  readtokens.c:177: error: assignment makes pointer from integer without a cast
  readtokens.c:178: error: implicit declaration of function 'xnrealloc' 
[-Wimplicit-function-declaration]
  readtokens.c:178: error: assignment makes pointer from integer without a cast
  readtokens.c:188: error: assignment makes pointer from integer without a cast
  make[4]: *** [readtokens.o] Error 1

I fixed it with the following:

>From 816a1ec4c989ffea4a462978db076c2f4322b730 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 6 Jan 2010 08:38:14 +0100
Subject: [PATCH] readtokens: this module *does* require xalloc.h

It uses only functions that were omitted by the old syntax-check rule.
* lib/readtokens.c: Include "xalloc.h" once again.
* modules/readtokens (Depends-on): Add xalloc.
This reverts part of 0e0f8f12ec241c0f1c1f21f960bb5cf908a0fa3c.
---
 ChangeLog          |    8 ++++++++
 lib/readtokens.c   |    2 ++
 modules/readtokens |    1 +
 3 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 80f3988..ae5e1a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-01-06  Jim Meyering  <address@hidden>
+
+       readtokens: this module *does* require xalloc.h
+       It uses only functions that were omitted by the old syntax-check rule.
+       * lib/readtokens.c: Include "xalloc.h" once again.
+       * modules/readtokens (Depends-on): Add xalloc.
+       This reverts part of 0e0f8f12ec241c0f1c1f21f960bb5cf908a0fa3c.
+
 2010-01-05  Eric Blake  <address@hidden>

        maint: support 'make announcement' from a VPATH build
diff --git a/lib/readtokens.c b/lib/readtokens.c
index 8172eb1..e29f20e 100644
--- a/lib/readtokens.c
+++ b/lib/readtokens.c
@@ -31,6 +31,8 @@
 #include <string.h>
 #include <stdbool.h>

+#include "xalloc.h"
+
 #if USE_UNLOCKED_IO
 # include "unlocked-io.h"
 #endif
diff --git a/modules/readtokens b/modules/readtokens
index d593b8f..9453de9 100644
--- a/modules/readtokens
+++ b/modules/readtokens
@@ -7,6 +7,7 @@ lib/readtokens.c
 m4/readtokens.m4

 Depends-on:
+xalloc
 stdbool

 configure.ac:
--
1.6.6.387.g2649b1




reply via email to

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