Message ID | SY4PR01MB84386E1AC3E75B7B79B50708CD8E9@SY4PR01MB8438.ausprd01.prod.outlook.com |
---|---|
State | Changes Requested |
Headers | show |
Series | [ovs-dev] conntrack-tp: Fix clang warning. | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
ovsrobot/intel-ovs-compilation | success | test: success |
On 3/30/23 16:16, miterv@outlook.com wrote: > From: Lin Huang <linhuang@ruijie.com.cn> > > Declaration of 'struct conn' will not be visible outside of this function. > Declaration of 'struct conntrack' will not be visible outside of this function. > Declaration of 'struct timeout_policy' will not be visible outside of this function. > > Signed-off-by: Lin Huang <linhuang@ruijie.com.cn> > --- > lib/conntrack-tp.h | 5 +++++ > 1 file changed, 5 insertions(+) > I can't reproduce the warning on a current master, but the change looks correct to me. Would be nice to add some empty lines to the file though to visually split macros, structs and functions. > diff --git a/lib/conntrack-tp.h b/lib/conntrack-tp.h > index 4d411d19f..2227f6fa5 100644 > --- a/lib/conntrack-tp.h > +++ b/lib/conntrack-tp.h > @@ -17,8 +17,13 @@ > #ifndef CONNTRACK_TP_H > #define CONNTRACK_TP_H 1 > > +#include <stdint.h> > + > #define CT_DPIF_NETDEV_TP_MIN 30 An empty line here. > enum ct_timeout; > +struct conn; > +struct conntrack; > +struct timeout_policy; And here. > void timeout_policy_init(struct conntrack *ct); > int timeout_policy_update(struct conntrack *ct, struct timeout_policy *tp); > int timeout_policy_delete(struct conntrack *ct, uint32_t tp_id); If you can add these empty lines and send v2, that would be great. Thanks! Best regards, Ilya Maximets.
diff --git a/lib/conntrack-tp.h b/lib/conntrack-tp.h index 4d411d19f..2227f6fa5 100644 --- a/lib/conntrack-tp.h +++ b/lib/conntrack-tp.h @@ -17,8 +17,13 @@ #ifndef CONNTRACK_TP_H #define CONNTRACK_TP_H 1 +#include <stdint.h> + #define CT_DPIF_NETDEV_TP_MIN 30 enum ct_timeout; +struct conn; +struct conntrack; +struct timeout_policy; void timeout_policy_init(struct conntrack *ct); int timeout_policy_update(struct conntrack *ct, struct timeout_policy *tp); int timeout_policy_delete(struct conntrack *ct, uint32_t tp_id);