Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#96 closed defect (fixed)

Wrong format strings

Reported by: nijel Owned by: moo
Priority: major Milestone: 1.2.1
Component: cacher Version: 1.2-dev
Keywords: Cc:
Application: PHP Version:
Other Exts: SAPI: FastCGI
Probability: Blocked By:
Blocking:

Description

When I compile xcache on amd64, compiler issues following warnings about format strings:

/tmp/buildd/xcache-1.2.0/build-php5/xcache.c: In function 'xcache_admin_auth_check':
/tmp/buildd/xcache-1.2.0/build-php5/xcache.c:1521: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
/tmp/buildd/xcache-1.2.0/build-php5/mem.c: In function 'xc_mem_init':
/tmp/buildd/xcache-1.2.0/build-php5/mem.c:317: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
/tmp/buildd/xcache-1.2.0/build-php5/xc_malloc.c: In function 'xc_mem_malloc_init':
/tmp/buildd/xcache-1.2.0/build-php5/xc_malloc.c:92: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'

Change History (3)

comment:1 Changed 7 years ago by judas_iscariote

  • Milestone set to 1.2.1

I had a patch for this somewhere.. I 'll check if I still have it handy..

comment:2 Changed 7 years ago by moo

  • Resolution set to fixed
  • Status changed from new to closed

fixed in [391] for trunk and [392] for b1.2

comment:3 Changed 7 years ago by nijel

BTW: For size_t, it would be probably better to use %zd format, at least you can avoid type casting this way.

Note: See TracTickets for help on using tickets.