On all platforms there is a
     (*new)>pool=pool;

followed closely by a
    stat = apr_pool_create(&(*new)->pool, pool);

Between these two, (*new)->pool is not used. I'd say the attribution
is unnecessary and can be removed.

Attached a patch (against 1.2.x head) that removes the unnecessary attribution.
I'll follow up with a 1.3 trunk patch.
(BTW, with this patch, all is well on Ubuntu 7.10. It builds and make
checks cleanly).

--
Lucian
Index: threadproc/win32/thread.c
===================================================================
--- threadproc/win32/thread.c	(revision 584394)
+++ threadproc/win32/thread.c	(working copy)
@@ -94,7 +94,6 @@
         return APR_ENOMEM;
     }
 
-    (*new)->pool = pool;
     (*new)->data = data;
     (*new)->func = func;
     (*new)->td   = NULL;
Index: threadproc/os2/thread.c
===================================================================
--- threadproc/os2/thread.c	(revision 584394)
+++ threadproc/os2/thread.c	(working copy)
@@ -88,7 +88,6 @@
         return APR_ENOMEM;
     }
 
-    thread->pool = pool;
     thread->attr = attr;
     thread->func = func;
     thread->data = data;
Index: threadproc/unix/thread.c
===================================================================
--- threadproc/unix/thread.c	(revision 584394)
+++ threadproc/unix/thread.c	(working copy)
@@ -163,7 +163,6 @@
         return APR_ENOMEM;
     }
 
-    (*new)->pool = pool;
     (*new)->data = data;
     (*new)->func = func;
 
Index: threadproc/netware/thread.c
===================================================================
--- threadproc/netware/thread.c	(revision 584394)
+++ threadproc/netware/thread.c	(working copy)
@@ -103,7 +103,6 @@
         return APR_ENOMEM;
     }
     
-    (*new)->pool = pool;
     (*new)->data = data;
     (*new)->func = func;
     (*new)->thread_name = (char*)apr_pstrdup(pool, threadName);
Index: threadproc/beos/thread.c
===================================================================
--- threadproc/beos/thread.c	(revision 584394)
+++ threadproc/beos/thread.c	(working copy)
@@ -80,7 +80,6 @@
         return APR_ENOMEM;
     }
 
-    (*new)->pool = pool;
     (*new)->data = data;
     (*new)->func = func;
     (*new)->exitval = -1;

Reply via email to