Skip to contentSkip to conversation

hazptr: Modify name of global variable that creates confusion

PATCH New Andreea-Cristina Bernat 1 participant 1 message Mar 19, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hazptr: Modify name of global variable that creates confusion

Since the former global variable plist was assigned to the local variable plist from the hazptr_init() function, the following warning was generated:
'plist' defined but not used.
Therefore, this patch renames the global variable plist to gplist.

---
 CodeSamples/defer/hazptr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
CodeSamples/defer/hazptr.c +2 -2
index e8c8cbc..2e8f819 100644
@@ -23,7 +23,7 @@
 
 static hazptr_head_t __thread *rlist;
 static unsigned long __thread rcount;
-static hazptr_head_t __thread **plist;
+static hazptr_head_t __thread **gplist;
 
 void hazptr_init(void)
 {
@@ -94,7 +94,7 @@ void hazptr_scan()
 	hazptr_head_t *tmplist;
 
 	/* List of hazard pointers, and its size. */
-	hazptr_head_t **plist = plist;
+	hazptr_head_t **plist = gplist;
 	unsigned long psize;
 
 	if (plist == NULL) {
Signature · 1 line
1.9.1