Re: test-sched.c warning

Bruno Haible <[email protected]>
Newsgroups gmane.comp.lib.gnulib.bugs,gmane.comp.gnu.m4.patches
Message-ID <[email protected]>
Eric,

I prefer to fix the warning this way. This way, the tests that use 'a' and 'b'
are not unnecessarily mixed.


2009-03-01  Bruno Haible  <[email protected]>

	Avoid a gcc warning.
	* tests/test-sched.c (b): Make global.
	Reported by Eric Blake.

--- tests/test-sched.c.orig	2009-03-01 17:54:32.000000000 +0100
+++ tests/test-sched.c	2009-03-01 17:53:16.000000000 +0100
@@ -1,5 +1,5 @@
 /* Test of <sched.h> substitute.
-   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
@@ -23,8 +23,8 @@
 /* Check that 'struct sched_param' is defined.  */
 static struct sched_param a;
 
-/* Check that the SCHED_* macris are defined and compile-time constants.  */
-static int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
+/* Check that the SCHED_* macros are defined and compile-time constants.  */
+int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
 
 static int f1;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.