当我编译以下代码时:
#define _POSIX_C_SOURCE 200112L
#define _ISOC99_SOURCE
#define __EXTENSIONS__
#include <stdio.h>
#include <limits.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
char *symlinkpath = argv[1];
char actualpath [PATH_MAX];
char *ptr;
ptr = realpath(symlinkpath, actualpath);
printf("%s\n", ptr);
}
我在包含对 realpath 函数的调用的行上收到警告,说:
warning: assignment makes pointer from integer without a cast
有谁知道怎么回事?我正在运行 Ubuntu Linux 9.04