0
この警告はどのように修正できますか?関数宣言のパラメータ名(型なし)
typedef void (*VF_A)(PST_A); // Warning here: parameter names (without types) in function declaration
typedef struct ST_A_ {
...
VF_A vf_a;
} ST_A, *PST_A;
この警告はどのように修正できますか?関数宣言のパラメータ名(型なし)
typedef void (*VF_A)(PST_A); // Warning here: parameter names (without types) in function declaration
typedef struct ST_A_ {
...
VF_A vf_a;
} ST_A, *PST_A;
この質問はResolve circular typedef dependency?に似ていますが、あなたはあなたの代わりに構造体の関数へのポインタを持っているという点で若干異なっています。 this answerの戦略を使用してください。
この問題の背後にあるアイデアは、新しいタイプを宣言しようとしており、同時に構造体を定義しようとしているということです。ソリューションはこれらの2つを分離することです:
typedef struct ST_A_ ST_A, *PST_A; // PST_A points to some struct, defined later
typedef void (*VF_A)(PST_A); // use PST_A to define VF_A
struct ST_A_ { VF_A vf_a; }; // now define the struct PST_A points to