Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Jun 2015 21:45: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: r284048 - head/usr.bin/vgrind
Message-ID:  <201506052145.t55Lja1F066670@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Fri Jun  5 21:45:35 2015
New Revision: 284048
URL: https://svnweb.freebsd.org/changeset/base/284048

Log:
  Fix some clang warnings:
  Add missing headers
  Add parenthesis when using the result of an assignment as a condition

Modified:
  head/usr.bin/vgrind/vgrindefs.c

Modified: head/usr.bin/vgrind/vgrindefs.c
==============================================================================
--- head/usr.bin/vgrind/vgrindefs.c	Fri Jun  5 21:35:20 2015	(r284047)
+++ head/usr.bin/vgrind/vgrindefs.c	Fri Jun  5 21:45:35 2015	(r284048)
@@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$");
 #define MAXHOP	32	/* max number of tc= indirections */
 
 #include <ctype.h>
+#include <fcntl.h>
+#include <string.h>
 #include <unistd.h>
 
 /*
@@ -308,7 +310,7 @@ tdecode(register char *str, char **area)
 	register int c;
 
 	cp = *area;
-	while (c = *str++) {
+	while ((c = *str++)) {
 	    if (c == ':' && *(cp-1) != '\\')
 		break;
 	    *cp++ = c;



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