git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] builtin/ff-refs.c: mark some file-local variables static

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Nov 25, 2015, 22:01 UTC
Message-ID
<56562FCE.7090007@ramsayjones.plus.com>
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
Hi Michael,

If you need to re-roll the patches in your 'mr/ff-refs' branch, could you please squash parts of this patch into the relevant patches from your branch.

Thanks.

Also, I note that gcc complains about the two calls to chdir(). (warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result [-Wunused-result])

ATB, Ramsay Jones

 builtin/ff-refs.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/builtin/ff-refs.c b/builtin/ff-refs.c
index ae68cfb..db8c378 100644
--- a/builtin/ff-refs.c
+++ b/builtin/ff-refs.c
@@ -5,10 +5,10 @@
 #include "run-command.h"
 #include "worktree.h"
 
-int dry_run = 0;
-int no_wt = 0;
-struct worktree **worktrees;
-const char *padding = ".....................................................";
+static int dry_run = 0;
+static int no_wt = 0;
+static struct worktree **worktrees;
+static const char *padding = ".....................................................";
 
 static const char * const builtin_ff_refs_usage[] = {
 	N_("git ff-refs [<options>]"),
-- 
2.6.0
Message 1 of 1 in “builtin/ff-refs.c: mark some file-local variables static”
  1. builtin/ff-refs.c: mark some file-local variables staticRamsay Jones, Nov 25, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.