Changeset 1201 in svn for trunk/mod_cacher/xc_cacher.c


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_cacher/xc_cacher.c

    r1199 r1201  
    411411    time_t n = XG(request_time) / interval;
    412412    if (*curtime != n) {
    413         zend_uint target_slot = n % count;
     413        zend_uint target_slot = ((zend_uint) n) % count;
    414414        zend_uint slot;
    415415        for (slot = advance_wrapped(*curslot, count);
     
    449449{
    450450    xc_entry_t *p, **pp;
    451     int i, c;
     451    size_t i, c;
    452452
    453453    for (i = 0, c = cache->hentry->size; i < c; i ++) {
     
    517517static void xc_gc_expires_var(TSRMLS_D) /* {{{ */
    518518{
    519     int i, c;
     519    size_t i, c;
    520520
    521521    if (!xc_var_gc_interval || !xc_var_caches) {
     
    736736{
    737737    zval* list;
    738     int i, c;
     738    size_t i, c;
    739739    xc_entry_t *e;
    740740
     
    934934    char *tokbuf;
    935935    size_t path_buffer_len;
    936     int size;
     936    size_t size;
    937937    char tokens[] = { DEFAULT_DIR_SEPARATOR, '\0' };
    938938    int ret;
     
    969969    if (zend_is_executing(TSRMLS_C)) {
    970970        const char *executing_filename = zend_get_executed_filename(TSRMLS_C);
    971         int dirname_len = strlen(executing_filename);
     971        int dirname_len = (int) strlen(executing_filename);
    972972        size_t filename_len = strlen(filepath);
    973973
     
    10661066
    10671067    compiler->new_entry.entry.name.str.val = xc_expand_url(filepath, compiler->opened_path_buffer TSRMLS_CC);
    1068     compiler->new_entry.entry.name.str.len = strlen(compiler->new_entry.entry.name.str.val);
     1068    compiler->new_entry.entry.name.str.len = (int) strlen(compiler->new_entry.entry.name.str.val);
    10691069
    10701070    *entry_checker_data->stored_entry = (xc_entry_php_t *) xc_entry_find_unlocked(
     
    11441144    else {
    11451145#ifdef ZEND_ENGINE_2_3
    1146         char *opened_path = php_resolve_path(compiler->filename, compiler->filename_len, PG(include_path) TSRMLS_CC);
     1146        char *opened_path = php_resolve_path(compiler->filename, (int) compiler->filename_len, PG(include_path) TSRMLS_CC);
    11471147        if (opened_path) {
    11481148            strcpy(compiler->opened_path_buffer, opened_path);
     
    11821182
    11831183        delta = XG(request_time) - buf.st_mtime;
    1184         if (abs(delta) < 2 && !xc_test) {
     1184        if (abs((int) delta) < 2 && !xc_test) {
    11851185            return FAILURE;
    11861186        }
     
    12141214            ++basename_begin;
    12151215
    1216             basename_hash_value = HASH_STR_L(basename_begin, filename_end - basename_begin);
     1216            basename_hash_value = HASH_STR_L(basename_begin, (uint) (filename_end - basename_begin));
    12171217        }
    12181218
     
    12541254
    12551255    PHP_MD5Init(&context);
    1256     while ((n = php_stream_read(stream, (char *) buf, sizeof(buf))) > 0) {
     1256    while ((n = php_stream_read(stream, (char *) buf, (int) sizeof(buf))) > 0) {
    12571257        PHP_MD5Update(&context, buf, n);
    12581258    }
Note: See TracChangeset for help on using the changeset viewer.