[PATCH nft 2/7] json: drop messages "warning: stmt ops chain have no json callback"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This message purely depends on the internal callbacks and at the program
code. This is not useful. What is the user going to do with this warning?

Maybe there is a bug here, but then we shouldn't print a warning but fix
the bug.

For example, calling `nft -j list ruleset` after test "tests/shell/testcases/chains/0041chain_binding_0"
will trigger messages like:

  warning: stmt ops chain have no json callback
  warning: stmt ops chain have no json callback

Signed-off-by: Thomas Haller <thaller@xxxxxxxxxx>
---
 src/json.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/src/json.c b/src/json.c
index c0ccf06d85b4..c66b58f8c6d5 100644
--- a/src/json.c
+++ b/src/json.c
@@ -52,9 +52,6 @@ static json_t *expr_print_json(const struct expr *expr, struct output_ctx *octx)
 	if (ops->json)
 		return ops->json(expr, octx);
 
-	fprintf(stderr, "warning: expr ops %s have no json callback\n",
-		expr_name(expr));
-
 	fp = octx->output_fp;
 	octx->output_fp = fmemopen(buf, 1024, "w");
 
@@ -95,9 +92,6 @@ static json_t *stmt_print_json(const struct stmt *stmt, struct output_ctx *octx)
 	if (stmt->ops->json)
 		return stmt->ops->json(stmt, octx);
 
-	fprintf(stderr, "warning: stmt ops %s have no json callback\n",
-		stmt->ops->name);
-
 	fp = octx->output_fp;
 	octx->output_fp = fmemopen(buf, 1024, "w");
 
-- 
2.41.0




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux