This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[patch] telldir.c
- From: Ralf Corsepius <ralf dot corsepius at rtems dot org>
- To: "newlib at sourceware dot org" <newlib at sourceware dot org>
- Date: Fri, 13 Jul 2012 13:12:33 +0200
- Subject: [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