bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH] tests: avoid warnings due to implicit declaration of memset


From: Jim Meyering
Subject: [PATCH] tests: avoid warnings due to implicit declaration of memset
Date: Sun, 09 Aug 2009 22:44:57 +0200

Hi Bruno,

Building coreutils on Solaris 10, I saw these two warnings:

  test-select-fd.c: In function 'main':
  test-select-fd.c:47: warning: implicit declaration of function 'memset'
  test-select-fd.c:47: warning: incompatible implicit declaration of built-in 
function 'memset'
    CCLD   test-select-fd
    CC     test-select-stdin.o
  test-select-stdin.c: In function 'main':
  test-select-stdin.c:42: warning: implicit declaration of function 'memset'
  test-select-stdin.c:42: warning: incompatible implicit declaration of 
built-in function 'memset'

Ok to push this fix?

>From 961c9e624934d39c05e8ff9f0321b6d03fab1c45 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sun, 9 Aug 2009 22:42:47 +0200
Subject: [PATCH] tests: avoid warnings due to implicit declaration of memset

* tests/test-select-stdin.c: Include <string.h> for decl of memset,
to avoid a warning at least on Solaris 10.
* tests/test-select-fd.c: Likewise.
---
 ChangeLog                 |    7 +++++++
 tests/test-select-fd.c    |    3 ++-
 tests/test-select-stdin.c |    3 ++-
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b5bac66..325e48a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-08-09  Jim Meyering  <address@hidden>
+
+       tests: avoid warnings due to implicit declaration of memset
+       * tests/test-select-stdin.c: Include <string.h> for decl of memset,
+       to avoid a warning at least on Solaris 10.
+       * tests/test-select-fd.c: Likewise.
+
 2009-08-09  Bruno Haible  <address@hidden>

        Avoid warnings from 'aclocal' that are due to a use of macro name
diff --git a/tests/test-select-fd.c b/tests/test-select-fd.c
index ddd2013..d145589 100644
--- a/tests/test-select-fd.c
+++ b/tests/test-select-fd.c
@@ -1,5 +1,5 @@
 /* Test of select() substitute, reading or writing from a given file 
descriptor.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009 Free Software Foundation, Inc.

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -20,6 +20,7 @@

 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <sys/select.h>

 int
diff --git a/tests/test-select-stdin.c b/tests/test-select-stdin.c
index e855f92..320f702 100644
--- a/tests/test-select-stdin.c
+++ b/tests/test-select-stdin.c
@@ -1,5 +1,5 @@
 /* Test of select() substitute, reading from stdin.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009 Free Software Foundation, Inc.

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -20,6 +20,7 @@

 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <sys/select.h>
 #include <sys/time.h>
 #include <unistd.h>
--
1.6.4.284.g34125




reply via email to

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