Changeset 844 in svn


Ignore:
Timestamp:
2012-03-25T07:18:30Z (3 years ago)
Author:
Xuefer
Message:

kill some warning

Location:
trunk/processor
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/processor/hashtable.m4

    r843 r844  
    109109#ifdef ZEND_ENGINE_2_4
    110110            memcpy(pnew, b, BUCKET_HEAD_SIZE(Bucket));
     111            memcpy((char *) (pnew + 1), b->arKey, BUCKET_KEY_SIZE(b));
    111112            pnew->arKey = (const char *) (pnew + 1);
    112             memcpy(pnew->arKey, b->arKey, BUCKET_KEY_SIZE(b));
    113113#else
    114114            memcpy(pnew, b, bucketsize);
  • trunk/processor/head.m4

    r843 r844  
    111111{
    112112    void **p = (void **) mem;
    113     void **end = (char *) mem + n;
     113    void **end = (void **) ((char *) mem + n);
    114114    while (p < end - sizeof(content)) {
    115115        *p = content;
     
    148148#endif
    149149/* {{{ xc_zstrlen_char */
    150 static inline int xc_zstrlen_char(zstr s)
     150static inline int xc_zstrlen_char(const_zstr s)
    151151{
    152152    return strlen(ZSTR_S(s));
     
    161161/* }}} */
    162162/* {{{ xc_zstrlen */
    163 static inline int xc_zstrlen(int type, zstr s)
     163static inline int xc_zstrlen(int type, const_zstr s)
    164164{
    165165    return type == IS_UNICODE ? xc_zstrlen_uchar(s) : xc_zstrlen_char(s);
  • trunk/processor/main.m4

    r843 r844  
    5858        $1 = (FORCETYPE *) (processor->p = (char *) ALIGN(processor->p));
    5959        ifelse(`$4', `', `
    60                 IFASSERT(`memsetptr($1, (void *) __LINE__, SIZE);')
     60                IFASSERT(`memsetptr($1, (void *) (unsigned long) __LINE__, SIZE);')
    6161            ', `
    6262                memset($1, 0, SIZE);
     
    159159define(`SETNULL', `SETNULL_EX(`dst->$1')DONE(`$1')')
    160160dnl }}}
     161dnl {{{ SETZERO_EX
     162define(`SETZERO_EX', `IFCOPY(`$1 = 0;')')
     163define(`SETZERO', `SETZERO_EX(`dst->$1')DONE(`$1')')
     164dnl }}}
    161165dnl {{{ COPYNULL_EX(1:dst, 2:elm-name)
    162166define(`COPYNULL_EX', `
     
    169173define(`COPYNULL', `
    170174    COPYNULL_EX(`dst->$1', `$1')DONE(`$1')
     175')
     176dnl }}}
     177dnl {{{ COPYZERO_EX(1:dst, 2:elm-name)
     178define(`COPYZERO_EX', `
     179    IFDASM(`add_assoc_long_ex(dst, ZEND_STRS("$2"), 0);')
     180    IFNOTMEMCPY(`IFCOPY(`$1 = 0;')')
     181    assert(patsubst($1, dst, src) == 0);
     182')
     183dnl }}}
     184dnl {{{ COPYZERO(1:elm)
     185define(`COPYZERO', `
     186    COPYZERO_EX(`dst->$1', `$1')DONE(`$1')
    171187')
    172188dnl }}}
  • trunk/processor/process.m4

    r843 r844  
    5656    , `$1', `zend_ulong',       `PROCESS_SCALAR(`$2', `lu', `$1')'
    5757    , `$1', `ulong',            `PROCESS_SCALAR(`$2', `lu', `$1')'
    58     , `$1', `size_t',           `PROCESS_SCALAR(`$2', `u', `$1')'
     58    , `$1', `size_t',           `PROCESS_SCALAR(`$2', `lu', `$1')'
    5959    , `$1', `long',             `PROCESS_SCALAR(`$2', `ld', `$1')'
    6060    , `$1', `time_t',           `PROCESS_SCALAR(`$2', `ld', `$1')'
  • trunk/processor/processor.m4

    r843 r844  
    405405    dnl runtime binding: ADD_INTERFACE will deal with it
    406406    COPYNULL(`interfaces')
    407     COPYNULL(`num_interfaces')
     407    COPYZERO(`num_interfaces')
    408408
    409409#   ifdef ZEND_ENGINE_2_4
    410410    dnl runtime binding: ADD_TRAIT will deal with it
    411411    COPYNULL(traits)
    412     COPYNULL(num_traits)
     412    COPYZERO(num_traits)
    413413#   endif
    414414#else
  • trunk/processor/string.m4

    r843 r844  
    4646                fprintf(stderr, "string:%s:\t\"", "$1");
    4747                xc_dprint_str_len(Z_STRVAL(reszv), Z_STRLEN(reszv));
    48                 fprintf(stderr, "\" len=%d\n", $3 - 1);
     48                fprintf(stderr, "\" len=%lu\n", (unsigned long) $3 - 1);
    4949                if (usecopy) {
    5050                    zval_dtor(&reszv);
     
    5656            fprintf(stderr, "string:%s:\t\"", "$1");
    5757            xc_dprint_str_len(SRCPTR, $3 - 1);
    58             fprintf(stderr, "\" len=%d\n", $3 - 1);
     58            fprintf(stderr, "\" len=%lu\n", (unsigned long) $3 - 1);
    5959            ')
    6060        ')
Note: See TracChangeset for help on using the changeset viewer.