git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH 6/6] json-writer.[ch]: remove unused formatting functions
Date: Fri, 19 Nov 2021 13:46:26 +0100	[thread overview]
Message-ID: <patch-6.6-e14ee1f8c47-20211119T124420Z-avarab@gmail.com> (raw)
In-Reply-To: <cover-0.6-00000000000-20211119T124420Z-avarab@gmail.com>

These were added in 75459410edd (json_writer: new routines to create
JSON data, 2018-07-13) for future use with trace2, but have not been
used by anything. These are easy enough to bring back should we need
them, but until then there's no point in carrying them.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 json-writer.c | 24 ------------------------
 json-writer.h |  3 ---
 2 files changed, 27 deletions(-)

diff --git a/json-writer.c b/json-writer.c
index f1cfd8fa8c6..8a81c2d5fce 100644
--- a/json-writer.c
+++ b/json-writer.c
@@ -331,36 +331,12 @@ void jw_array_false(struct json_writer *jw)
 	strbuf_addstr(&jw->json, "false");
 }
 
-void jw_array_bool(struct json_writer *jw, int value)
-{
-	if (value)
-		jw_array_true(jw);
-	else
-		jw_array_false(jw);
-}
-
 void jw_array_null(struct json_writer *jw)
 {
 	array_common(jw);
 	strbuf_addstr(&jw->json, "null");
 }
 
-void jw_array_sub_jw(struct json_writer *jw, const struct json_writer *value)
-{
-	assert_is_terminated(value);
-
-	array_common(jw);
-	append_sub_jw(jw, value);
-}
-
-void jw_array_argc_argv(struct json_writer *jw, int argc, const char **argv)
-{
-	int k;
-
-	for (k = 0; k < argc; k++)
-		jw_array_string(jw, argv[k]);
-}
-
 void jw_array_argv(struct json_writer *jw, const char **argv)
 {
 	while (*argv)
diff --git a/json-writer.h b/json-writer.h
index 209355e0f12..563c7e0e004 100644
--- a/json-writer.h
+++ b/json-writer.h
@@ -95,10 +95,7 @@ void jw_array_intmax(struct json_writer *jw, intmax_t value);
 void jw_array_double(struct json_writer *jw, int precision, double value);
 void jw_array_true(struct json_writer *jw);
 void jw_array_false(struct json_writer *jw);
-void jw_array_bool(struct json_writer *jw, int value);
 void jw_array_null(struct json_writer *jw);
-void jw_array_sub_jw(struct json_writer *jw, const struct json_writer *value);
-void jw_array_argc_argv(struct json_writer *jw, int argc, const char **argv);
 void jw_array_argv(struct json_writer *jw, const char **argv);
 
 void jw_array_inline_begin_object(struct json_writer *jw);
-- 
2.34.0.817.gb03b3d32691


  parent reply	other threads:[~2021-11-19 12:46 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19 12:46 [PATCH 0/6] various: remove dead code Ævar Arnfjörð Bjarmason
2021-11-19 12:46 ` [PATCH 1/6] xdiff/xmacros.h: remove unused XDL_PTRFREE Ævar Arnfjörð Bjarmason
2021-11-19 14:32   ` Jeff King
2021-11-19 12:46 ` [PATCH 2/6] pack-bitmap-write: remove unused bitmap_reset() function Ævar Arnfjörð Bjarmason
2021-11-19 14:33   ` Jeff King
2021-11-19 12:46 ` [PATCH 3/6] object-store.h: remove unused has_sha1_file*() Ævar Arnfjörð Bjarmason
2021-11-19 14:34   ` Jeff King
2021-11-19 12:46 ` [PATCH 4/6] alloc.[ch]: remove alloc_report() function Ævar Arnfjörð Bjarmason
2021-11-19 19:42   ` Junio C Hamano
2021-11-19 12:46 ` [PATCH 5/6] strbuf: remove unused istarts_with() function Ævar Arnfjörð Bjarmason
2021-11-19 14:40   ` Jeff King
2021-11-19 19:14   ` Junio C Hamano
2021-11-19 12:46 ` Ævar Arnfjörð Bjarmason [this message]
2021-11-19 14:41   ` [PATCH 6/6] json-writer.[ch]: remove unused formatting functions Jeff King
2021-11-19 21:53     ` Junio C Hamano
2021-11-19 14:42 ` [PATCH 0/6] various: remove dead code Jeff King
2021-11-19 20:26 ` [PATCH v2 0/5] " Ævar Arnfjörð Bjarmason
2021-11-19 20:26   ` [PATCH v2 1/5] xdiff/xmacros.h: remove unused XDL_PTRFREE Ævar Arnfjörð Bjarmason
2021-11-19 20:26   ` [PATCH v2 2/5] pack-bitmap-write: remove unused bitmap_reset() function Ævar Arnfjörð Bjarmason
2021-11-19 20:26   ` [PATCH v2 3/5] object-store.h: remove unused has_sha1_file*() Ævar Arnfjörð Bjarmason
2021-11-19 20:26   ` [PATCH v2 4/5] alloc.[ch]: remove alloc_report() function Ævar Arnfjörð Bjarmason
2021-11-19 20:26   ` [PATCH v2 5/5] json-writer.[ch]: remove unused formatting functions Ævar Arnfjörð Bjarmason
2022-03-26 17:14   ` [PATCH v3 0/7] various: remove dead code, drop i18n not used in-tree Ævar Arnfjörð Bjarmason
2022-03-26 17:14     ` [PATCH v3 1/7] run-command.h: remove always unused "clean_on_exit_handler_cbdata" Ævar Arnfjörð Bjarmason
2022-03-26 17:14     ` [PATCH v3 2/7] configure.ac: remove USE_PIC comment Ævar Arnfjörð Bjarmason
2022-03-26 17:14     ` [PATCH v3 3/7] xdiff/xmacros.h: remove unused XDL_PTRFREE Ævar Arnfjörð Bjarmason
2022-03-26 17:14     ` [PATCH v3 4/7] pack-bitmap-write: remove unused bitmap_reset() function Ævar Arnfjörð Bjarmason
2022-03-26 17:14     ` [PATCH v3 5/7] object-store.h: remove unused has_sha1_file*() Ævar Arnfjörð Bjarmason
2022-03-26 17:14     ` [PATCH v3 6/7] alloc.[ch]: remove alloc_report() function Ævar Arnfjörð Bjarmason
2022-03-26 17:14     ` [PATCH v3 7/7] git-sh-setup: don't mark trees not used in-tree for i18n Ævar Arnfjörð Bjarmason
2022-03-27 10:47       ` Johannes Sixt
2022-03-27 11:15         ` Ævar Arnfjörð Bjarmason
2022-03-28  6:04           ` Johannes Sixt
2022-03-28 12:16             ` Ævar Arnfjörð Bjarmason
2022-03-28 20:06               ` Johannes Sixt
2022-03-31 10:23               ` Phillip Wood
2022-03-31 11:15                 ` Ævar Arnfjörð Bjarmason
2022-03-31 20:27                   ` Johannes Sixt
2022-04-02 10:44                     ` Ævar Arnfjörð Bjarmason
2022-04-02 14:16                       ` Johannes Sixt
2022-04-03 15:22                         ` Ævar Arnfjörð Bjarmason
2022-04-04 20:20                           ` Johannes Sixt
2022-03-31  1:45     ` [PATCH v4 0/6] various: remove dead code Ævar Arnfjörð Bjarmason
2022-03-31  1:45       ` [PATCH v4 1/6] run-command.h: remove always unused "clean_on_exit_handler_cbdata" Ævar Arnfjörð Bjarmason
2022-03-31 22:03         ` Junio C Hamano
2022-03-31  1:45       ` [PATCH v4 2/6] configure.ac: remove USE_PIC comment Ævar Arnfjörð Bjarmason
2022-03-31  1:45       ` [PATCH v4 3/6] xdiff/xmacros.h: remove unused XDL_PTRFREE Ævar Arnfjörð Bjarmason
2022-03-31  1:45       ` [PATCH v4 4/6] pack-bitmap-write: remove unused bitmap_reset() function Ævar Arnfjörð Bjarmason
2022-03-31 22:06         ` Junio C Hamano
2022-03-31  1:45       ` [PATCH v4 5/6] object-store.h: remove unused has_sha1_file*() Ævar Arnfjörð Bjarmason
2022-03-31  1:45       ` [PATCH v4 6/6] alloc.[ch]: remove alloc_report() function Ævar Arnfjörð Bjarmason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=patch-6.6-e14ee1f8c47-20211119T124420Z-avarab@gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).