'2008/08'에 해당되는 글 1건

  1. 2008.08.19 cast from pointer to integer of different size

32비트 머신에서는 warning 없이 잘 컴파일 되던 것이 64비트 머신으로 갔더니
cast from pointer to integer of different size
이런 메세지가 뜬다..


unsigned short int* 형을 unsigned int형으로 바꾸는 부분에서 발생한 warning인데
sizeof로 확인해보니
unsigned short int*가 64비트에서는 8byte 자료형이고, unsigned int는 4byte 자료형이라서 발생하는 문제였다.
그래서 unsigned intunsigned long int로 수정했더니 warning이 사라졌다.

'프로그램밍' 카테고리의 다른 글

fopen(fclose) vs open(close) 속도 측정  (0) 2008.05.06
구글 엄청 빠르네...크롤러와 동적 색인...  (2) 2008.01.17
gcov - 쓰레기 코드 찾아내기  (0) 2008.01.17
valgrind (callgrind)  (3) 2007.11.08
ternary search tree-1  (0) 2007.11.01
Posted by 고요한하늘
,