Ignore:
Timestamp:
2012-12-17T14:22:49+01:00 (3 years ago)
Author:
Xuefer
Message:

fix some 64bit warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mod_coverager/xc_coverager.c

    r1151 r1201  
    4040}
    4141/* }}} */
    42 static void xcache_mkdirs_ex(char *root, int rootlen, char *path, int pathlen TSRMLS_DC) /* {{{ */
     42static void xcache_mkdirs_ex(char *root, long rootlen, char *path, long pathlen TSRMLS_DC) /* {{{ */
    4343{
    4444    char *fullpath;
     
    7676    long covlines, *phits;
    7777    int fd = -1;
    78     int size;
     78    size_t size;
    7979    int newfile;
    8080    struct stat srcstat, outstat;
     
    277277    zstr s;
    278278    char *outfilename;
    279     int dumpdir_len, outfilelen, alloc_len = 0;
     279    size_t dumpdir_len, outfilelen, alloc_len = 0;
    280280    uint size;
    281281    HashPosition pos;
     
    334334                zend_hash_move_forward_ex(cov, &pos2);
    335335            }
    336             add_assoc_zval_ex(return_value, ZSTR_S(filename), strlen(ZSTR_S(filename)) + 1, lines);
     336            add_assoc_zval_ex(return_value, ZSTR_S(filename), (uint) strlen(ZSTR_S(filename)) + 1, lines);
    337337
    338338            zend_hash_move_forward_ex(XG(coverages), &pos);
     
    357357static coverager_t xc_coverager_get(const char *filename TSRMLS_DC) /* {{{ */
    358358{
    359     int len = strlen(filename) + 1;
     359    uint len = (uint) strlen(filename) + 1;
    360360    coverager_t cov, *pcov;
    361361
     
    473473    if (XG(coverages) && XG(coverager_started)) {
    474474        int size = xc_coverager_get_op_array_size_no_tail(op_array);
    475         int oplineno = (*EG(opline_ptr)) - op_array->opcodes;
     475        int oplineno = (int) ((*EG(opline_ptr)) - op_array->opcodes);
    476476        if (oplineno < size) {
    477477            xc_coverager_add_hits(xc_coverager_get(op_array->filename TSRMLS_CC), (*EG(opline_ptr))->lineno, 1 TSRMLS_CC);
     
    498498
    499499    p = (long*) str;
    500     len -= sizeof(long);
     500    len -= (int) sizeof(long);
    501501    if (len < 0) {
    502502        return;
     
    507507    }
    508508
    509     for (; len >= (int) sizeof(long) * 2; len -= sizeof(long) * 2, p += 2) {
     509    for (; len >= (int) sizeof(long) * 2; len -= (int) sizeof(long) * 2, p += 2) {
    510510        add_index_long(return_value, p[0], p[1] < 0 ? 0 : p[1]);
    511511    }
     
    658658
    659659    if (cfg_get_string("xcache.coveragedump_directory", &xc_coveragedump_dir) == SUCCESS && xc_coveragedump_dir) {
    660         int len;
     660        size_t len;
    661661        xc_coveragedump_dir = pestrdup(xc_coveragedump_dir, 1);
    662662        len = strlen(xc_coveragedump_dir);
Note: See TracChangeset for help on using the changeset viewer.