svn commit: r313709 - head/usr.bin/dtc

Dimitry Andric dim at FreeBSD.org
Mon Feb 13 20:56:55 UTC 2017


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) :


More information about the svn-src-all mailing list