Ignore:
Timestamp:
Jan 30, 2020 7:52:51 AM (5 years ago)
Author:
nanang
Message:

Misc (re #2210): Fixed compile warnings in PJLIB timer unit test.

File:
1 edited

Legend:

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

    r6100 r6146  
    251251        pj_bool_t is_poll; 
    252252        unsigned cnt; 
    253     } stat[ST_POLL_THREAD_COUNT + ST_CANCEL_THREAD_COUNT]; 
     253    } stat[ST_POLL_THREAD_COUNT + ST_CANCEL_THREAD_COUNT + 1]; 
     254    /* Plus one here to avoid compile warning of zero-sized array */ 
    254255}; 
    255256 
     
    832833                      BENCH_TEST_TYPE test_type) 
    833834{ 
    834     pj_timestamp t1, t2; 
     835    pj_timestamp t1; 
    835836    unsigned mult = BT_ENTRY_SHOW_START; 
    836837    int i, j; 
    837838 
    838839    pj_get_timestamp(&t1); 
    839     t2.u64 = 0; 
    840840    /*Schedule random entry.*/ 
    841841    for (i=0, j=0; j < BT_ENTRY_COUNT; ++j) { 
Note: See TracChangeset for help on using the changeset viewer.