This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] telldir.c


Hi,

Another, almost cosmetic patch:

It puts dd_hash_lock's definition into #ifdef HAVE_DD_LOCK preprocessor guards to prevent "unused var" compiler warnings.

OK to commit?

Ralf
2012-07-13  Ralf Corsépius  <ralf.corsepius@rtems.org>

	* libc/posix/telldir.c: Conditionally build dd_hash_lock.


Index: libc/posix/telldir.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/posix/telldir.c,v
retrieving revision 1.9
diff -u -r1.9 telldir.c
--- libc/posix/telldir.c	9 Mar 2010 20:38:18 -0000	1.9
+++ libc/posix/telldir.c	13 Jul 2012 09:53:31 -0000
@@ -69,7 +69,10 @@
 
 static long	dd_loccnt = 1;	/* Index of entry for sequential readdir's */
 static struct	ddloc *dd_hash[NDIRHASH];   /* Hash list heads for ddlocs */
+
+#ifdef HAVE_DD_LOCK
 __LOCK_INIT(static, dd_hash_lock);
+#endif
 
 /*
  * return a pointer into a directory

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]