类型转换R-1-10-4强制

禁止指针变量的赋值类型与指针变量类型不一致

指针变量赋值类型不一致
test.c
1#include <stdlib.h>
2
3void foo(char *buf)
4{
5 unsigned char *bytes = NULL;
6 bytes = buf;
禁止指针变量的赋值类型与指针变量类型不一致 [gjb8114-r-1-10-4]
7}
指针变量赋值类型一致
test.c
1#include <stdlib.h>
2
3void foo(unsigned char *buf)
4{
5 unsigned char *bytes = NULL;
6 bytes = buf;
7}