public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Harald Nordgren via GitGitGadget" <gitgitgadget@gmail•com>
To: git@vger•kernel.org
Cc: Harald Nordgren <haraldnordgren@gmail•com>,
	Harald Nordgren <haraldnordgren@gmail•com>
Subject: [PATCH] pkt-line: initialize packet_buffer to avoid macOS linker warning
Date: Wed, 27 May 2026 17:11:59 +0000	[thread overview]
Message-ID: <pull.2313.git.git.1779901919956.gitgitgadget@gmail.com> (raw)

From: Harald Nordgren <haraldnordgren@gmail•com>

Signed-off-by: Harald Nordgren <haraldnordgren@gmail•com>
---
    pkt-line: initialize packet_buffer to avoid macOS linker warning
    
    Removes this warning:
    
    $ make -s -j8
    GIT_VERSION=2.54.0.380.gc69baaf57b
    ld: warning: reducing alignment of section __DATA,__common from 0x8000 to 0x4000 because it exceeds segment maximum alignment
    ld: warning: reducing alignment of section __DATA,__common from 0x8000 to 0x4000 because it exceeds segment maximum alignment
    ld: warning: reducing alignment of section __DATA,__common from 0x8000 to 0x4000 because it exceeds segment maximum alignment
    ld: warning: reducing alignment of section __DATA,__common from 0x8000 to 0x4000 because it exceeds segment maximum alignment
    ld: warning: reducing alignment of section __DATA,__common from 0x8000 to 0x4000 because it exceeds segment maximum alignment
    ld: warning: reducing alignment of section __DATA,__common from 0x8000 to 0x4000 because it exceeds segment maximum alignment
    ld: warning: reducing alignment of section __DATA,__common from 0x8000 to 0x4000 because it exceeds segment maximum alignment
    ld: warning: reducing alignment of section __DATA,__common from 0x8000 to 0x4000 because it exceeds segment maximum alignment
    

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2313%2FHaraldNordgren%2Fpkt-line-init-buffer-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2313/HaraldNordgren/pkt-line-init-buffer-v1
Pull-Request: https://github.com/git/git/pull/2313

 pkt-line.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkt-line.c b/pkt-line.c
index 3fc3e9ea70..cfd2799677 100644
--- a/pkt-line.c
+++ b/pkt-line.c
@@ -8,7 +8,7 @@
 #include "trace.h"
 #include "write-or-die.h"
 
-char packet_buffer[LARGE_PACKET_MAX];
+char packet_buffer[LARGE_PACKET_MAX] = {0};
 static const char *packet_trace_prefix = "git";
 static struct trace_key trace_packet = TRACE_KEY_INIT(PACKET);
 static struct trace_key trace_pack = TRACE_KEY_INIT(PACKFILE);

base-commit: c69baaf57ba26cf117c2b6793802877f19738b0d
-- 
gitgitgadget

             reply	other threads:[~2026-05-27 17:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-27 17:11 Harald Nordgren via GitGitGadget [this message]
2026-05-28  3:04 ` [PATCH] pkt-line: initialize packet_buffer to avoid macOS linker warning Junio C Hamano
2026-05-28  7:40   ` Harald Nordgren
2026-05-28  8:14     ` Harald Nordgren
2026-05-28 20:12       ` Junio C Hamano
2026-05-29 14:32 ` [PATCH v2] config.mak.uname: avoid macOS linker warning on Xcode 16.3+ Harald Nordgren via GitGitGadget
2026-06-01 22:41   ` Junio C Hamano
2026-06-02  7:37   ` [PATCH v3] " Harald Nordgren via GitGitGadget

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

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

  git send-email \
    --in-reply-to=pull.2313.git.git.1779901919956.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=haraldnordgren@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox