about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2016-08-07 16:14:49 +0100
committerJohn Keeping <john@keeping.me.uk>2016-10-01 11:43:45 +0100
commit7e67c64894b1093fbc009edd811fee1e76daa2d7 (patch)
tree5bfc570a1b1041d27b3b785453cc28d45f748969
parentui-shared: fix decl-after-statement warnings (diff)
downloadcgit-pink-7e67c64894b1093fbc009edd811fee1e76daa2d7.tar.gz
cgit-pink-7e67c64894b1093fbc009edd811fee1e76daa2d7.zip
ui-ssdiff: fix decl-after-statement warnings
git.git's coding style avoids decl-after-statement and we generally try
to follow it but a few warnings have crept in recently.  Fix the one in
ui-ssdiff.c

Signed-off-by: John Keeping <john@keeping.me.uk>
-rw-r--r--ui-ssdiff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui-ssdiff.c b/ui-ssdiff.c
index 16c812f..7f261ed 100644
--- a/ui-ssdiff.c
+++ b/ui-ssdiff.c
@@ -92,7 +92,7 @@ static char *longest_common_subsequence(char *A, char *B)
 static int line_from_hunk(char *line, char type)
 {
 	char *buf1, *buf2;
-	int len;
+	int len, res;
 
 	buf1 = strchr(line, type);
 	if (buf1 == NULL)
@@ -105,7 +105,7 @@ static int line_from_hunk(char *line, char type)
 	buf2 = xmalloc(len + 1);
 	strncpy(buf2, buf1, len);
 	buf2[len] = '\0';
-	int res = atoi(buf2);
+	res = atoi(buf2);
 	free(buf2);
 	return res;
 }
td> 2022-01-19Add basic installJune McEnroe 2022-01-19Use cards with add_subdirectoryJune McEnroe 2022-01-19Replace build system with cmakeJune McEnroe 2022-01-19Replace build system with cmakeJune McEnroe Thanks to cr1901 for helping to test this on Windows. 2020-03-31Allow choosing freecell game on command lineJune McEnroe 2020-01-27Remove cards submoduleJune McEnroe 2019-12-19Remove READMEJune McEnroe 2019-12-16Update submodule URLJune McEnroe 2019-12-15Use symlink for README.3June McEnroe 2019-08-27Show game number in titleJune McEnroe 2019-08-27Replicate the FreeCell LCG and deal algorithmJune McEnroe 2019-08-26Move as deep a stack as possible to empty columnsJune McEnroe 2019-08-26Simplify card and stack function namesJune McEnroe 2019-08-26Clean up namingJune McEnroe 2019-08-25Rewrite FreeCellJune McEnroe With move sequencing! 2019-08-25Build with cards submoduleJune McEnroe 2019-08-25Add cards submoduleJune McEnroe 2019-08-25Remove files from cards repoJune McEnroe 2019-08-22Add READMEJune McEnroe 2019-08-22Add exampleJune McEnroe 2019-08-22Add FILES sectionJune McEnroe 2019-08-22Remove gamesJune McEnroe 2019-04-04Mark card functions inlineJune McEnroe 2019-04-04Add listClearJune McEnroe 2019-04-03Tweak mouseButtonUp code a bitJune McEnroe It's still kind of confusing. 2019-04-03Check gameAvail on double-clickJune McEnroe 2019-04-02Select and move cards on mouse upJune McEnroe 2019-04-01Add idSkipJune McEnroe In Windows 95 FREECELL.EXE, the resource IDs are changed to 403, 404 and 405. For some reason. 2019-03-31Fix weird typoJune McEnroe What the hell. 2019-03-30Add undo to freecellJune McEnroe 2019-03-29Replace path.h with asset.hJune McEnroe 2019-03-29Add king win faceJune McEnroe 2019-03-29Change king face directionJune McEnroe 2019-03-29Load king bitmaps in freecellJune McEnroe