Opened 16 years ago
Closed 16 years ago
#1366 closed defect (fixed)
64-bit assumed "unsigned int" size: psModules/src/detrend/pmDark.c
| Reported by: | Michael Wood-Vasey | Owned by: | Paul Price |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | detrend | Version: | |
| Severity: | normal | Keywords: | |
| Cc: |
Description
pthread_t id = pthread_self();
char name[64];
sprintf (name, "%x", (unsigned int) id);
psTimerStart (name);
There's no guarantee that "unsigned int" will be 64 bits.
Compilation (Mac OS X 10.6, Intel 64-bit, gcc-4.2) fails with
libtool: compile: gcc-4.2 -std=gnu99 -DHAVE_CONFIG_H -I. -I. -I../../src -I../../src -I../../src/extras -I../../src/config -I../../src/concepts -I../../src/camera -I../../src/astrom -I../../src/detrend -I../../src/imcombine -I../../src/objects -I/Volumes/data/PS1/code/ipp-2.9/mwv.darwin_x86/include -D_DARWIN_C_SOURCE -I/Volumes/data/PS1/code/ipp-2.9/mwv.darwin_x86/include/pslib -I/Volumes/data/PS1/code/ipp-2.9/mwv.darwin_x86/include/mysql -I/Volumes/data/PS1/code/ipp-2.9/mwv.darwin_x86/include -D_THREAD_SAFE -DHAVE_PSDB -I/Volumes/data/PS1/code/ipp-2.9/mwv.darwin_x86/include -pipe -O2 -g -DPS_NO_TRACE -Wall -Werror -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112L -MT libpsmodulesdetrend_la-pmPattern.lo -MD -MP -MF .deps/libpsmodulesdetrend_la-pmPattern.Tpo -c pmPattern.c -fno-common -DPIC -o .libs/libpsmodulesdetrend_la-pmPattern.o
cc1: warnings being treated as errors
pmDark.c: In function 'pmDarkCombine':
pmDark.c:354: warning: cast from pointer to integer of different size

Looks like that snippet is completely unnecessary, so I've removed it, trunk@27597.