hazptr: Modify name of global variable that creates confusion
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.
Signed-off-by Andreea-Cristina Bernat <[email protected]>
--- CodeSamples/defer/hazptr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
CodeSamples/defer/hazptr.c +2 -2
@@ -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