Ignore:
Timestamp:
Mar 10, 2006 12:57:12 PM (18 years ago)
Author:
bennylp
Message:

Fixed compilation and run warnings/errors with MSVC 2005

File:
1 edited

Legend:

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

    r304 r315  
    2424#include <pj/rand.h> 
    2525#include <pj/assert.h> 
    26 #include <pj/compat/vsprintf.h> 
    27 #include <pj/compat/sprintf.h> 
    2826#include <pj/errno.h> 
    2927#include <pj/except.h> 
     
    231229 
    232230    if (cstr_thread_name && pj_strlen(&thread_name) < sizeof(thread->obj_name)-1) 
    233         pj_sprintf(thread->obj_name, cstr_thread_name, thread->idthread); 
     231        pj_ansi_sprintf(thread->obj_name, cstr_thread_name, thread->idthread); 
    234232    else 
    235         pj_sprintf(thread->obj_name, "thr%p", (void*)thread->idthread); 
     233        pj_ansi_sprintf(thread->obj_name, "thr%p", (void*)thread->idthread); 
    236234     
    237235    rc = pj_thread_local_set(thread_tls_id, thread); 
     
    310308 
    311309    if (strchr(thread_name, '%')) { 
    312         pj_snprintf(rec->obj_name, PJ_MAX_OBJ_NAME, thread_name, rec); 
     310        pj_ansi_snprintf(rec->obj_name, PJ_MAX_OBJ_NAME, thread_name, rec); 
    313311    } else { 
    314         strncpy(rec->obj_name, thread_name, PJ_MAX_OBJ_NAME); 
     312        pj_ansi_strncpy(rec->obj_name, thread_name, PJ_MAX_OBJ_NAME); 
    315313        rec->obj_name[PJ_MAX_OBJ_NAME-1] = '\0'; 
    316314    } 
     
    689687    } 
    690688    if (strchr(name, '%')) { 
    691         pj_snprintf(mutex->obj_name, PJ_MAX_OBJ_NAME, name, mutex); 
     689        pj_ansi_snprintf(mutex->obj_name, PJ_MAX_OBJ_NAME, name, mutex); 
    692690    } else { 
    693         strncpy(mutex->obj_name, name, PJ_MAX_OBJ_NAME); 
     691        pj_ansi_strncpy(mutex->obj_name, name, PJ_MAX_OBJ_NAME); 
    694692        mutex->obj_name[PJ_MAX_OBJ_NAME-1] = '\0'; 
    695693    } 
     
    10451043    } 
    10461044    if (strchr(name, '%')) { 
    1047         pj_snprintf(sem->obj_name, PJ_MAX_OBJ_NAME, name, sem); 
     1045        pj_ansi_snprintf(sem->obj_name, PJ_MAX_OBJ_NAME, name, sem); 
    10481046    } else { 
    1049         strncpy(sem->obj_name, name, PJ_MAX_OBJ_NAME); 
     1047        pj_ansi_strncpy(sem->obj_name, name, PJ_MAX_OBJ_NAME); 
    10501048        sem->obj_name[PJ_MAX_OBJ_NAME-1] = '\0'; 
    10511049    } 
     
    11751173    } 
    11761174    if (strchr(name, '%')) { 
    1177         pj_snprintf(event->obj_name, PJ_MAX_OBJ_NAME, name, event); 
     1175        pj_ansi_snprintf(event->obj_name, PJ_MAX_OBJ_NAME, name, event); 
    11781176    } else { 
    1179         strncpy(event->obj_name, name, PJ_MAX_OBJ_NAME); 
     1177        pj_ansi_strncpy(event->obj_name, name, PJ_MAX_OBJ_NAME); 
    11801178        event->obj_name[PJ_MAX_OBJ_NAME-1] = '\0'; 
    11811179    } 
Note: See TracChangeset for help on using the changeset viewer.