socsvn commit: r239913 - in soc2012/jhagewood/sdiff: . sdiff
jhagewood at FreeBSD.org
jhagewood at FreeBSD.org
Mon Jul 30 12:57:05 UTC 2012
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
More information about the svn-soc-all
mailing list