Opened 15 years ago
#1473 new defect
pzgetimfiles.c and pztool.c need %lld for summit_id
| Reported by: | Michael Wood-Vasey | Owned by: | eugene |
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | ippTools | Version: | |
| Severity: | minor | Keywords: | |
| Cc: |
Description
Compiling pzgetimfiles.c and pztool.c on my Mac OS X (Intel, x86), gcc 4.2, I get warnings for several "%ld", summit_id references in pzgetimfiles.c (lines 127, 143) and pztool.c (lines 640, 915).
pzgetimfiles.c: In function ‘go’:
pzgetimfiles.c:127: warning: format ‘%ld’ expects type ‘long int’, but argument 4 has type ‘psS64’
pzgetimfiles.c:143: warning: format ‘%ld’ expects type ‘long int’, but argument 4 has type ‘psS64’
I tried OFF_T_FMT as a generalization, but that didn't work, so I set them to "%lld" to match psS64 of summit_id.
I've checked this in to Gene's ipp-20110404 dev branch.
There are some queries built using "%ld" for summit_id (pzgetimfiles.c 168, 183, 267, 295, 298, 327) that perhaps should be changed as well. Whether summit_id is long or long long doesn't appear to be an arch-dependent thing; it's a feature of the database.
What's the right fix?
