From owner-svn-soc-all@FreeBSD.ORG Mon Jul 30 12:57:05 2012 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id 77204106566B for ; Mon, 30 Jul 2012 12:57:03 +0000 (UTC) (envelope-from jhagewood@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Mon, 30 Jul 2012 12:57:03 +0000 Date: Mon, 30 Jul 2012 12:57:03 +0000 From: jhagewood@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20120730125703.77204106566B@hub.freebsd.org> Cc: Subject: socsvn commit: r239913 - in soc2012/jhagewood/sdiff: . sdiff X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2012 12:57:05 -0000 Author: jhagewood Date: Mon Jul 30 12:57:02 2012 New Revision: 239913 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=239913 Log: Fixed compiler warnings in sdiff. Modified: soc2012/jhagewood/sdiff/hagewood-sdiff.patch soc2012/jhagewood/sdiff/sdiff/sdiff.c Modified: soc2012/jhagewood/sdiff/hagewood-sdiff.patch ============================================================================== --- soc2012/jhagewood/sdiff/hagewood-sdiff.patch Mon Jul 30 11:29:05 2012 (r239912) +++ soc2012/jhagewood/sdiff/hagewood-sdiff.patch Mon Jul 30 12:57:02 2012 (r239913) @@ -173,7 +173,7 @@ + diff -rupN sdiff-orig/sdiff.c sdiff/sdiff.c --- sdiff-orig/sdiff.c 2012-07-26 03:11:02.000000000 -0400 -+++ sdiff/sdiff.c 2012-07-27 04:03:20.000000000 -0400 ++++ sdiff/sdiff.c 2012-07-30 12:54:48.000000000 -0400 @@ -5,6 +5,14 @@ * Public domain. */ @@ -204,7 +204,7 @@ static void enqueue(char *, char, char *); static char *mktmpcpy(const char *); +static int istextfile(FILE *); -+static void binexec(char *, char *, char *); __dead2; ++static void binexec(char *, char *, char *) __dead2; static void freediff(struct diffline *); static void int_usage(void); static int parsecmd(FILE *, FILE *, FILE *); @@ -380,7 +380,7 @@ if ((ofd = mkstemp(target_file)) == -1) { warn("error opening %s", target_file); - goto FAIL; -+ fail(*target_file); ++ fail(target_file); } while ((rcount = read(ifd, buf, sizeof(buf))) != -1 && rcount != 0) { @@ -389,13 +389,13 @@ if (-1 == wcount || rcount != wcount) { warn("error writing to %s", target_file); - goto FAIL; -+ fail(*target_file); ++ fail(target_file); } } if (rcount == -1) { warn("error reading from %s", source_file); - goto FAIL; -+ fail(*target_file); ++ fail(target_file); } close(ifd); @@ -741,7 +741,7 @@ processq(); } -@@ -1103,24 +1160,35 @@ printd(FILE *file1, size_t file1end) +@@ -1103,24 +1160,36 @@ printd(FILE *file1, size_t file1end) static void int_usage(void) { @@ -753,8 +753,10 @@ - "r | 2:\tchoose right diff\n" - "s:\tsilent mode--don't print identical lines\n" - "v:\tverbose mode--print identical lines\n" +- "q:\tquit"); + -+ printf("%s", "e:\tedit blank diff\n", ++ printf("%s", ++ "e:\tedit blank diff\n", + "eb:\tedit both diffs concatenated\n", + "el:\tedit left diff\n", + "er:\tedit right diff\n", @@ -762,7 +764,7 @@ + "r | 2:\tchoose right diff\n", + "s:\tsilent mode--don't print identical lines\n", + "v:\tverbose mode--print identical lines\n", - "q:\tquit"); ++ "q:\tquit\n"); } static void Modified: soc2012/jhagewood/sdiff/sdiff/sdiff.c ============================================================================== --- soc2012/jhagewood/sdiff/sdiff/sdiff.c Mon Jul 30 11:29:05 2012 (r239912) +++ soc2012/jhagewood/sdiff/sdiff/sdiff.c Mon Jul 30 12:57:02 2012 (r239913) @@ -64,7 +64,7 @@ static void enqueue(char *, char, char *); static char *mktmpcpy(const char *); static int istextfile(FILE *); -static void binexec(char *, char *, char *); __dead2; +static void binexec(char *, char *, char *) __dead2; static void freediff(struct diffline *); static void int_usage(void); static int parsecmd(FILE *, FILE *, FILE *); @@ -215,7 +215,7 @@ err(2, "asprintf"); if ((ofd = mkstemp(target_file)) == -1) { warn("error opening %s", target_file); - fail(*target_file); + fail(target_file); } while ((rcount = read(ifd, buf, sizeof(buf))) != -1 && rcount != 0) { @@ -224,12 +224,12 @@ wcount = write(ofd, buf, (size_t)rcount); if (-1 == wcount || rcount != wcount) { warn("error writing to %s", target_file); - fail(*target_file); + fail(target_file); } } if (rcount == -1) { warn("error reading from %s", source_file); - fail(*target_file); + fail(target_file); } close(ifd); @@ -1161,7 +1161,8 @@ int_usage(void) { - printf("%s", "e:\tedit blank diff\n", + printf("%s", + "e:\tedit blank diff\n", "eb:\tedit both diffs concatenated\n", "el:\tedit left diff\n", "er:\tedit right diff\n", @@ -1169,7 +1170,7 @@ "r | 2:\tchoose right diff\n", "s:\tsilent mode--don't print identical lines\n", "v:\tverbose mode--print identical lines\n", - "q:\tquit"); + "q:\tquit\n"); } static void