Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Dec 2017 20:05:36 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r326630 - head/usr.bin/sdiff
Message-ID:  <201712062005.vB6K5axo089302@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Wed Dec  6 20:05:36 2017
New Revision: 326630
URL: https://svnweb.freebsd.org/changeset/base/326630

Log:
  Fix -Wincompatible-pointer-types-discards-qualifiers warnings
  
  MFC after:	1 week

Modified:
  head/usr.bin/sdiff/sdiff.c

Modified: head/usr.bin/sdiff/sdiff.c
==============================================================================
--- head/usr.bin/sdiff/sdiff.c	Wed Dec  6 18:36:54 2017	(r326629)
+++ head/usr.bin/sdiff/sdiff.c	Wed Dec  6 20:05:36 2017	(r326630)
@@ -29,7 +29,7 @@ __FBSDID("$FreeBSD$");
 
 #include "extern.h"
 
-#define DIFF_PATH	"/usr/bin/diff"
+static char diff_path[] = "/usr/bin/diff";
 
 #define WIDTH 126
 /*
@@ -213,9 +213,11 @@ main(int argc, char **argv)
 	int ch, fd[2] = {-1}, status;
 	pid_t pid=0;
 	const char *outfile = NULL;
-	char **diffargv, *diffprog = DIFF_PATH, *filename1, *filename2,
+	char **diffargv, *diffprog = diff_path, *filename1, *filename2,
 	     *tmp1, *tmp2, *s1, *s2;
 	int i;
+	char I_arg[] = "-I";
+	char speed_lf[] = "--speed-large-files";
 
 	/*
 	 * Process diff flags.
@@ -269,14 +271,14 @@ main(int argc, char **argv)
 				sprintf(diffargv[1], "%s%c", diffargv[1], ch);
 			break;
 		case 'H':
-			diffargv[diffargc++] = "--speed-large-files";
+			diffargv[diffargc++] = speed_lf;
 			break;
 		case DIFFPROG_OPT:
 			diffargv[0] = diffprog = optarg;
 			break;
 		case 'I':
 			Iflag = 1;
-			diffargv[diffargc++] = "-I";
+			diffargv[diffargc++] = I_arg;
 			diffargv[diffargc++] = optarg;
 			break;
 		case 'l':



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712062005.vB6K5axo089302>