Changeset 6067


Ignore:
Timestamp:
Sep 9, 2019 8:41:53 AM (13 months ago)
Author:
nanang
Message:

Re #2225: Fixed compile errors in timer on MSVC2005.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/timer.c

    r6058 r6067  
    301301        GET_ENTRY(removed_node)->_timer_id) 
    302302    { 
    303             PJ_LOG(3,(THIS_FILE, "Bug! Trying to remove entry %p from %s " 
    304                                  "line %d, which has been deallocated " 
    305                                  "without being cancelled", 
    306                                  GET_ENTRY(removed_node), 
    307303#if PJ_TIMER_DEBUG 
    308                                  removed_node->src_file, 
    309                                  removed_node->src_line)); 
     304        PJ_LOG(3,(THIS_FILE, "Bug! Trying to remove entry %p from %s " 
     305                             "line %d, which has been deallocated " 
     306                             "without being cancelled", 
     307                             GET_ENTRY(removed_node), 
     308                             removed_node->src_file, 
     309                             removed_node->src_line)); 
    310310#else 
    311                                  "N/A", 0)); 
     311        PJ_LOG(3,(THIS_FILE, "Bug! Trying to remove entry %p " 
     312                             "which has been deallocated " 
     313                             "without being cancelled", 
     314                             GET_ENTRY(removed_node))); 
    312315#endif 
    313316#if ASSERT_IF_ENTRY_DESTROYED 
     
    352355    pj_timer_id_t *new_timer_ids; 
    353356    pj_size_t i; 
     357    pj_timer_entry_dup **new_heap = 0; 
    354358     
    355359    PJ_LOG(6,(THIS_FILE, "Growing heap size from %d to %d", 
     
    357361     
    358362    // First grow the heap itself. 
    359      
    360     pj_timer_entry_dup **new_heap = 0; 
    361      
    362363    new_heap = (pj_timer_entry_dup**)  
    363364               pj_pool_calloc(ht->pool, new_size, sizeof(pj_timer_entry_dup*)); 
     
    379380        int idx = ht->heap[i] - ht->timer_dups; 
    380381        // Point to the address in the new array 
    381         pj_assert(idx >= 0 && idx < ht->max_size); 
     382        pj_assert(idx >= 0 && idx < (int)ht->max_size); 
    382383        new_heap[i] = &new_timer_dups[idx]; 
    383384    } 
     
    805806        { 
    806807            valid = PJ_FALSE; 
     808#if PJ_TIMER_DEBUG 
    807809            PJ_LOG(3,(THIS_FILE, "Bug! Polling entry %p from %s line %d has " 
    808810                                 "been deallocated without being cancelled", 
    809811                                 GET_ENTRY(node), 
    810 #if PJ_TIMER_DEBUG 
    811812                                 node->src_file, node->src_line)); 
    812813#else 
    813                                  "N/A", 0)); 
     814            PJ_LOG(3,(THIS_FILE, "Bug! Polling entry %p has " 
     815                                 "been deallocated without being cancelled", 
     816                                 GET_ENTRY(node))); 
    814817#endif 
    815818#if ASSERT_IF_ENTRY_DESTROYED 
Note: See TracChangeset for help on using the changeset viewer.