git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Shahzad Lone <shahzadlone@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH 3/3] It's C not C++ so variable length array should not be used [-Werror=vla] :,).
Date: Fri, 1 Feb 2019 08:36:14 +0000	[thread overview]
Message-ID: <01020168a8338127-d50bd8d1-c178-4f13-86b1-9a191f64ded0-000000@eu-west-1.amazonses.com> (raw)
In-Reply-To: <01020168a8338064-b1c054c4-3e05-4825-b8dc-636d9c63dcfc-000000@eu-west-1.amazonses.com>

---
 builtin/pack-objects.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index c1ec9ef3232cb..3017beb8236fa 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -197,9 +197,8 @@ static unsigned long write_large_blob_data(struct git_istream *st, struct hashfi
 					   const struct object_id *oid)
 {
 	git_zstream stream;
-	const unsigned bufsize = 16384;
-	unsigned char ibuf[bufsize];
-	unsigned char obuf[bufsize];
+	unsigned char ibuf[16384];
+	unsigned char obuf[16384];
 	unsigned long olen = 0;
 
 	git_deflate_init(&stream, pack_compression_level);

--
https://github.com/git/git/pull/572

  parent reply	other threads:[~2019-02-01  8:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-01  8:36 [PATCH 1/3] [Enhancement] Improve internals / refactoring Shahzad Lone
2019-02-01  8:36 ` [PATCH 2/3] ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] so fix that Shahzad Lone
2019-02-01  9:00   ` Eric Sunshine
2019-02-01  8:36 ` Shahzad Lone [this message]
2019-02-01  9:02   ` [PATCH 3/3] It's C not C++ so variable length array should not be used [-Werror=vla] :,) Eric Sunshine
2019-02-01 23:52 ` [PATCH v2 [rebased]] [Enhancement] Improve internals / refactoring Shahzad Lone
2019-02-02  3:09   ` Brandon Richardson
2019-02-02 23:16   ` [PATCH v3 [re-fixed] ] " Shahzad Lone
2019-02-04 17:56     ` Junio C Hamano

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=01020168a8338127-d50bd8d1-c178-4f13-86b1-9a191f64ded0-000000@eu-west-1.amazonses.com \
    --to=shahzadlone@gmail.com \
    --cc=git@vger.kernel.org \
    /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).