내가 패치를 만들려고하지만 난 이러한 유형의 경고를 만난 적이에 잘못된 종류 :스파 스 경고 : 할당
e = ipt_next_entry(e);
그동안 :이 오류는이 시점에서 나타납니다
warning: incorrect type in assignment (different modifiers)
expected struct ipt_entry *[assigned] e
got struct ipt_entry [pure] *
전자 및 ipt_next_entry 모두의 선언은 다음과 같습니다
이struct ipt_entry *e;
static inline __pure
struct ipt_entry *ipt_next_entry(const struct ipt_entry *entry)
{
return (void *)entry + entry->next_offset;
}
내 질문이 정확히 : 무엇을 할 __pure 네? 내가 무엇을 할 수 있을지? 이 부분에 대해서는 어디에서 읽을 수 있습니까? 인터넷에서 아무 것도 찾을 수 없습니다.
신속하게이 발견 : http://lxr.free-electrons.com/source/include/linux/compiler-gcc.h#L94 그것은이다 '__attribute __ ((pure))'로 확장되는 매크로로 소스 코드에서 직접 볼 수 있습니다. 그래서 ... https://ohse.de/uwe/articles/gcc-attributes.html#func-pure –