warning: initialization from incompatible pointer type

static ssize_t device_write(struct file *, const char *, size_t, loff_t *);
在函数的原型里是const char *,但在编写时缺少const,导致warning,加上const,warning消除。

你可能感兴趣的:(warning: initialization from incompatible pointer type)