list2.c:51:5: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’ [-Wformat=] printf("%.12s ", ctime(&st->st_mtime)+4);
리눅스에서 파일수정 시간을 출력하려고 하는데 원하는 결과는 나오지만 워닝이 떱니다. 설명좀 부탁드리겠습니다.
#include <time.h>
이런거 해야 ctime의 return 값이 제대로 char * 인 줄 압니다. default로는 int로 생각하고 처리할테니 저런 warning이 생깁니다.
---http://coolengineer.com
include
#include <time.h>이런거 해야 ctime의 return 값이 제대로 char * 인 줄 압니다. default로는 int로 생각하고 처리할테니 저런 warning이 생깁니다.
---
http://coolengineer.com