Ticket #96 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

Wrong format strings

Reported by: nijel Owned by: moo
Priority: major Milestone: 1.2.1
Component: cacher Version: 1.2-dev
Keywords: Cc:
Blocked By: PHP Version:
Application: Need User Feedback:
Other Exts: SAPI: FastCGI
Probability: 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

Changed 6 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..

Changed 6 years ago by moo

  • status changed from new to closed
  • resolution set to fixed

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

Changed 6 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.