Changeset 970fd0a in git


Ignore:
Timestamp:
2014-09-12T05:49:52Z (3 years ago)
Author:
Xuefer <xuefer@…>
Branches:
master, trunk
Children:
f6d26f8
Parents:
c253a53
Message:

kill warning

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1538 c26eb9a1-5813-0410-bd6c-c2e55f420ca7

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • mod_cacher/xc_cacher.c

    rd9514bc r970fd0a  
    425425static void xc_entry_hold_php_unlocked(xc_cache_t *cache, xc_entry_php_t *entry TSRMLS_DC) /* {{{ */
    426426{
    427     TRACE("hold %d:%s", entry->file_inode, entry->entry.name.str.val);
     427    TRACE("hold %lu:%s", (unsigned long) entry->file_inode, entry->entry.name.str.val);
    428428#ifndef ZEND_WIN32
    429429    if (XG(holds_pid) != getpid()) {
     
    512512static XC_ENTRY_APPLY_FUNC(xc_gc_expires_php_entry_unlocked) /* {{{ */
    513513{
    514     TRACE("ttl %lu, %lu %lu", (zend_ulong) XG(request_time), (zend_ulong) entry->atime, xc_php_ttl);
     514    TRACE("ttl %lu, %lu %lu", (unsigned long) XG(request_time), (unsigned long) entry->atime, xc_php_ttl);
    515515    if (XG(request_time) > entry->atime + (time_t) xc_php_ttl) {
    516516        return 1;
     
    887887                while (xc_stack_count(s)) {
    888888                    entry_php = (xc_entry_php_t *) xc_stack_pop(s);
    889                     TRACE("unhold %d:%s", entry_php->file_inode, entry_php->entry.name.str.val);
     889                    TRACE("unhold %lu:%s", (unsigned long) entry_php->file_inode, entry_php->entry.name.str.val);
    890890                    assert(entry_php->refcount > 0);
    891891                    --entry_php->refcount;
     
    10521052        php_stream_statbuf ssb;
    10531053        php_stream_wrapper *wrapper = NULL;
     1054#ifdef ZEND_ENGINE_2_6
     1055        const
     1056#endif
    10541057        char *path_for_open = NULL;
    10551058
     
    13251328static void xc_entry_php_init(xc_entry_php_t *entry_php, const char *filepath TSRMLS_DC) /* {{{*/
    13261329{
    1327     entry_php->filepath.str = ZEND_24((char *), NOTHING) filepath;
     1330    entry_php->filepath.str = (char *) filepath;
    13281331    entry_php->filepath.len = strlen(entry_php->filepath.str);
    13291332#ifdef ZEND_ENGINE_2_3
     
    13881391} xc_const_usage_t;
    13891392
    1390 #define XCACHE_ANALYZE_CONSTANT(type, u_, shift) \
    1391     if (zend_##u_##binary_strcmp(Z_STRVAL_P(constant), Z_STRLEN_P(constant), compiler->new_entry.u_##type##path.str, compiler->new_entry.u_##type##path.len) == 0) { \
     1393#define XCACHE_ANALYZE_CONSTANT(type, shift) \
     1394    if (zend_binary_strcmp(Z_STRVAL_P(constant), Z_STRLEN_P(constant), compiler->new_entry.type##path.str, compiler->new_entry.type##path.len) == 0) { \
     1395        usage->type##path_used = 1; \
     1396        constantinfo |= xcache_constant_is_##type << (shift * xcache_constant_info_shift); \
     1397        TRACE("found %s constant %s", #type, Z_STRVAL_P(constant)); \
     1398    }
     1399
     1400#define XCACHE_ANALYZE_UCONSTANT(type, shift) \
     1401    if (zend_u_binary_strcmp(Z_STRVAL_P(constant), Z_STRLEN_P(constant), compiler->new_entry.u_#type##path.str, compiler->new_entry.u_##type##path.len) == 0) { \
    13921402        usage->u_##type##path_used = 1; \
    13931403        constantinfo |= xcache_constant_is_##type << (shift * xcache_constant_info_shift); \
     
    13991409static void xc_collect_class_constant_info(xc_compiler_t *compiler, xc_const_usage_t *usage, xc_classinfo_t *classinfo, HashTable *constants TSRMLS_DC) /* {{{ */
    14001410{
    1401     zend_uint count = 0;
    14021411    uint index;
    14031412    xc_vector_t constantinfos;
     
    14161425
    14171426            if ((Z_TYPE_P(constant) & IS_CONSTANT_TYPE_MASK) == IS_STRING) {
    1418                 XCACHE_ANALYZE_CONSTANT(file, , 0)
    1419                 else XCACHE_ANALYZE_CONSTANT(dir, , 0)
     1427                XCACHE_ANALYZE_CONSTANT(file, 0)
     1428                else XCACHE_ANALYZE_CONSTANT(dir, 0)
    14201429            }
    14211430#   ifdef IS_UNICODE
    14221431            else if ((Z_TYPE_P(constant) & IS_CONSTANT_TYPE_MASK) == IS_UNICODE) {
    1423                 XCACHE_ANALYZE_CONSTANT(file, u_, 0)
    1424                 else XCACHE_ANALYZE_CONSTANT(dir, u_, 0)
     1432                XCACHE_ANALYZE_UCONSTANT(file, 0)
     1433                else XCACHE_ANALYZE_UCONSTANT(dir, 0)
    14251434            }
    14261435#   endif
     
    14581467
    14591468        if (Z_TYPE_P(constant) == IS_STRING) {
    1460             XCACHE_ANALYZE_CONSTANT(file, , 0)
    1461             else XCACHE_ANALYZE_CONSTANT(dir, , 0)
     1469            XCACHE_ANALYZE_CONSTANT(file, 0)
     1470            else XCACHE_ANALYZE_CONSTANT(dir, 0)
    14621471        }
    14631472#   ifdef IS_UNICODE
    14641473        else if (Z_TYPE_P(constant) == IS_UNICODE) {
    1465             XCACHE_ANALYZE_CONSTANT(file, u_, 0)
    1466             else XCACHE_ANALYZE_CONSTANT(dir, u_, 0)
     1474            XCACHE_ANALYZE_UCONSTANT(file, 0)
     1475            else XCACHE_ANALYZE_UCONSTANT(dir, 0)
    14671476        }
    14681477#   endif
     
    14861495            zval *constant = &Z_OP_CONSTANT(opline->op1);
    14871496            if (Z_TYPE_P(constant) == IS_STRING) {
    1488                 XCACHE_ANALYZE_CONSTANT(file, , 0)
     1497                XCACHE_ANALYZE_CONSTANT(file, 0)
    14891498#   ifdef ZEND_ENGINE_2_3
    1490                 else XCACHE_ANALYZE_CONSTANT(dir, , 0)
     1499                else XCACHE_ANALYZE_CONSTANT(dir, 0)
    14911500#   endif
    14921501            }
    14931502#   ifdef IS_UNICODE
    14941503            else if (Z_TYPE_P(constant) == IS_UNICODE) {
    1495                 XCACHE_ANALYZE_CONSTANT(file, u_, 0)
    1496                 else XCACHE_ANALYZE_CONSTANT(dir, u_, 0)
     1504                XCACHE_ANALYZE_UCONSTANT(file, 0)
     1505                else XCACHE_ANALYZE_UCONSTANT(dir, 0)
    14971506            }
    14981507#   endif
     
    15021511            zval *constant = &Z_OP_CONSTANT(opline->op2);
    15031512            if (Z_TYPE_P(constant) == IS_STRING) {
    1504                 XCACHE_ANALYZE_CONSTANT(file, , 1)
     1513                XCACHE_ANALYZE_CONSTANT(file, 1)
    15051514#   ifdef ZEND_ENGINE_2_3
    1506                 else XCACHE_ANALYZE_CONSTANT(dir, , 1)
     1515                else XCACHE_ANALYZE_CONSTANT(dir, 1)
    15071516#   endif
    15081517            }
    15091518#   ifdef IS_UNICODE
    15101519            else if (Z_TYPE_P(constant) == IS_UNICODE) {
    1511                 XCACHE_ANALYZE_CONSTANT(file, u_, 1)
    1512                 else XCACHE_ANALYZE_CONSTANT(dir, u_, 1)
     1520                XCACHE_ANALYZE_UCONSTANT(file, 1)
     1521                else XCACHE_ANALYZE_UCONSTANT(dir, 1)
    15131522            }
    15141523#   endif
     
    19461955    CG(compiled_filename) = stored_entry->entry.name.str.val;
    19471956    CG(zend_lineno)       = 0;
    1948     TRACE("restoring %d:%s", stored_entry->file_inode, stored_entry->entry.name.str.val);
     1957    TRACE("restoring %lu:%s", (unsigned long) stored_entry->file_inode, stored_entry->entry.name.str.val);
    19491958    xc_processor_restore_xc_entry_php_t(&restored_entry, stored_entry TSRMLS_CC);
    19501959    xc_processor_restore_xc_entry_data_php_t(stored_entry, &restored_php, stored_php, xc_readonly_protection TSRMLS_CC);
     
    19781987    CG(in_compilation)    = 0;
    19791988    CG(compiled_filename) = NULL;
    1980     TRACE("restored %d:%s", stored_entry->file_inode, stored_entry->entry.name.str.val);
     1989    TRACE("restored %lu:%s", (unsigned long) stored_entry->file_inode, stored_entry->entry.name.str.val);
    19811990    return op_array;
    19821991}
     
    20482057        if (stored_entry) {
    20492058            xc_php_addref_unlocked(stored_php);
    2050             TRACE(" cached %d:%s, holding", compiler->new_entry.file_inode, stored_entry->entry.name.str.val);
     2059            TRACE(" cached %lu:%s, holding", (unsigned long) compiler->new_entry.file_inode, stored_entry->entry.name.str.val);
    20512060            xc_entry_hold_php_unlocked(cache, stored_entry TSRMLS_CC);
    20522061        }
     
    21612170            xc_cached_hit_unlocked(cache->cached TSRMLS_CC);
    21622171
    2163             TRACE(" hit %d:%s, holding", compiler->new_entry.file_inode, stored_entry->entry.name.str.val);
     2172            TRACE(" hit %lu:%s, holding", (unsigned long) compiler->new_entry.file_inode, stored_entry->entry.name.str.val);
    21642173            xc_entry_hold_php_unlocked(cache, stored_entry TSRMLS_CC);
    21652174            stored_php = stored_entry->php;
     
    21672176        }
    21682177
    2169         TRACE("miss entry %d:%s", compiler->new_entry.file_inode, compiler->new_entry.entry.name.str.val);
     2178        TRACE("miss entry %lu:%s", (unsigned long) compiler->new_entry.file_inode, compiler->new_entry.entry.name.str.val);
    21702179
    21712180        if (xc_entry_data_php_init_md5(cache, compiler TSRMLS_CC) != SUCCESS) {
     
    21822191            if (stored_entry) {
    21832192                xc_php_addref_unlocked(stored_php);
    2184                 TRACE(" cached %d:%s, holding", compiler->new_entry.file_inode, stored_entry->entry.name.str.val);
     2193                TRACE(" cached %lu:%s, holding", (unsigned long) compiler->new_entry.file_inode, stored_entry->entry.name.str.val);
    21852194                xc_entry_hold_php_unlocked(cache, stored_entry TSRMLS_CC);
    21862195            }
  • mod_coverager/xc_coverager.c

    r708688b3 r970fd0a  
    3131{
    3232    coverager_t cov = *(coverager_t*) pDest;
    33     TRACE("destroy %p", cov);
     33    TRACE("destroy %p", (void *) cov);
    3434    zend_hash_destroy(cov);
    3535    efree(cov);
     
    4242    ALLOCA_FLAG(use_heap)
    4343
    44     TRACE("mkdirs %s %d %s %d", root, rootlen, path, pathlen);
     44    TRACE("mkdirs %s %ld %s %ld", root, rootlen, path, pathlen);
    4545    fullpath = xc_do_alloca(rootlen + pathlen + 1, use_heap);
    4646    memcpy(fullpath, root, rootlen);
     
    357357
    358358    if (zend_u_hash_find(XG(coverages), IS_STRING, filename, len, (void **) &pcov) == SUCCESS) {
    359         TRACE("got coverage %s %p", filename, *pcov);
     359        TRACE("got coverage %s %p", filename, (void *) *pcov);
    360360        return *pcov;
    361361    }
     
    364364        zend_hash_init(cov, 0, NULL, NULL, 0);
    365365        zend_u_hash_add(XG(coverages), IS_STRING, filename, len, (void **) &cov, sizeof(cov), NULL);
    366         TRACE("new coverage %s %p", filename, cov);
     366        TRACE("new coverage %s %p", filename, (void *) cov);
    367367        return cov;
    368368    }
  • xcache/xc_allocator_bestfit.c

    rf703531 r970fd0a  
    168168        TRACE(" -> avail: %lu (%luKB). new next: %p offset: %lu %luKB. Got: %p"
    169169                , allocator->avail, allocator->avail / 1024
    170                 , newb
     170                , (void *) newb
    171171                , PSUB(newb, allocator), PSUB(newb, allocator) / 1024
    172172                , p
Note: See TracChangeset for help on using the changeset viewer.