BUILD: do not specify "const" on functions returning structs or scalars
Older compilers (like gcc-3.4) warn about the use of "const" on functions
returning a struct, which makes sense since the return may only be copied :
include/common/htx.h:233: warning: type qualifiers ignored on function return type
Let's simply drop "const" here.
diff --git a/include/common/htx.h b/include/common/htx.h
index 8d639a3..9cbc953 100644
--- a/include/common/htx.h
+++ b/include/common/htx.h
@@ -229,48 +229,48 @@
#define HTX_SL_RES_CPTR(sl) HTX_SL_P2_PTR(sl)
#define HTX_SL_RES_RPTR(sl) HTX_SL_P3_PTR(sl)
-static inline const struct ist htx_sl_p1(const struct htx_sl *sl)
+static inline struct ist htx_sl_p1(const struct htx_sl *sl)
{
return ist2(HTX_SL_P1_PTR(sl), HTX_SL_P1_LEN(sl));
}
-static inline const struct ist htx_sl_p2(const struct htx_sl *sl)
+static inline struct ist htx_sl_p2(const struct htx_sl *sl)
{
return ist2(HTX_SL_P2_PTR(sl), HTX_SL_P2_LEN(sl));
}
-static inline const struct ist htx_sl_p3(const struct htx_sl *sl)
+static inline struct ist htx_sl_p3(const struct htx_sl *sl)
{
return ist2(HTX_SL_P3_PTR(sl), HTX_SL_P3_LEN(sl));
}
-static inline const struct ist htx_sl_req_meth(const struct htx_sl *sl)
+static inline struct ist htx_sl_req_meth(const struct htx_sl *sl)
{
return htx_sl_p1(sl);
}
-static inline const struct ist htx_sl_req_uri(const struct htx_sl *sl)
+static inline struct ist htx_sl_req_uri(const struct htx_sl *sl)
{
return htx_sl_p2(sl);
}
-static inline const struct ist htx_sl_req_vsn(const struct htx_sl *sl)
+static inline struct ist htx_sl_req_vsn(const struct htx_sl *sl)
{
return htx_sl_p3(sl);
}
-static inline const struct ist htx_sl_res_vsn(const struct htx_sl *sl)
+static inline struct ist htx_sl_res_vsn(const struct htx_sl *sl)
{
return htx_sl_p1(sl);
}
-static inline const struct ist htx_sl_res_code(const struct htx_sl *sl)
+static inline struct ist htx_sl_res_code(const struct htx_sl *sl)
{
return htx_sl_p2(sl);
}
-static inline const struct ist htx_sl_res_reason(const struct htx_sl *sl)
+static inline struct ist htx_sl_res_reason(const struct htx_sl *sl)
{
return htx_sl_p3(sl);
}