Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Feb 2017 20:56:54 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r313709 - head/usr.bin/dtc
Message-ID:  <201702132056.v1DKusnZ046275@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Mon Feb 13 20:56:53 2017
New Revision: 313709
URL: https://svnweb.freebsd.org/changeset/base/313709

Log:
  Fix build of BSD dtc when NDEBUG is defined (MK_ASSERT_DEBUG=no):
  * Initialize correct parent in binary_operator's constructor.
  * Include <errno.h> explicitly, otherwise errno is undefined (without
    NDEBUG, this is accidentally 'fixed' by including <iostream>).
  
  Reported by:	matteo
  MFC after:	3 days

Modified:
  head/usr.bin/dtc/input_buffer.cc

Modified: head/usr.bin/dtc/input_buffer.cc
==============================================================================
--- head/usr.bin/dtc/input_buffer.cc	Mon Feb 13 20:51:08 2017	(r313708)
+++ head/usr.bin/dtc/input_buffer.cc	Mon Feb 13 20:56:53 2017	(r313709)
@@ -32,6 +32,7 @@
 
 #include "input_buffer.hh"
 #include <ctype.h>
+#include <errno.h>
 #include <limits.h>
 #include <stdint.h>
 #include <stdio.h>
@@ -544,7 +545,8 @@ struct binary_operator : public binary_o
 	 * Constructor.  Takes the name of the operator as an argument, for
 	 * debugging.  Only stores it in debug mode.
 	 */
-	binary_operator(source_location l, const char *) : expression(l) {}
+	binary_operator(source_location l, const char *) :
+		binary_operator_base(l) {}
 #else
 	const char *opName;
 	binary_operator(source_location l, const char *o) :



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