Browse Source

nptl_db: fix gcc compiler warnings

Waldemar Brodkorb 7 years ago
parent
commit
783d740538
2 changed files with 4 additions and 3 deletions
  1. 2 1
      libpthread/nptl_db/td_ta_thr_iter.c
  2. 2 2
      libpthread/nptl_db/td_thr_tlsbase.c

+ 2 - 1
libpthread/nptl_db/td_ta_thr_iter.c

@@ -29,6 +29,7 @@ iterate_thread_list (td_thragent_t *ta, td_thr_iter_f *callback,
   td_err_e err;
   psaddr_t next, ofs;
   void *copy;
+  int descr_pri;
 
   /* Test the state.
      XXX This is incomplete.  Normally this test should be in the loop.  */
@@ -89,7 +90,7 @@ iterate_thread_list (td_thragent_t *ta, td_thr_iter_f *callback,
       /* Now test whether this thread matches the specified conditions.  */
 
       /* Only if the priority level is as high or higher.  */
-      int descr_pri = ((uintptr_t) schedpolicy == SCHED_OTHER
+      descr_pri = ((uintptr_t) schedpolicy == SCHED_OTHER
 		       ? 0 : (uintptr_t) schedprio);
       if (descr_pri >= ti_pri)
 	{

+ 2 - 2
libpthread/nptl_db/td_thr_tlsbase.c

@@ -24,12 +24,12 @@ td_thr_tlsbase (const td_thrhandle_t *th,
 		psaddr_t *base)
 {
   td_err_e err;
-  psaddr_t dtv, dtvslot, dtvptr;
+  psaddr_t dtv, dtvslot, dtvptr, pd;
 
   if (modid < 1)
     return TD_NOTLS;
 
-  psaddr_t pd = th->th_unique;
+  pd = th->th_unique;
   if (pd == 0)
     {
       /* This is the fake handle for the main thread before libpthread