From 5b6b10d4e227b6fbbcdac1b9d585a2f3b19a9665 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Sat, 14 May 2022 12:28:03 -0300 Subject: [PATCH 1/2] maybe fix clang warning --- src/s2/s2edge_distances.cc | 4 +++- src/s2/s2edge_distances.h | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/s2/s2edge_distances.cc b/src/s2/s2edge_distances.cc index d0caf6a0..82331f06 100644 --- a/src/s2/s2edge_distances.cc +++ b/src/s2/s2edge_distances.cc @@ -186,7 +186,9 @@ S1Angle GetDistance(const S2Point& x, const S2Point& a, const S2Point& b) { return min_dist.ToAngle(); } -bool UpdateMinDistance(const S2Point& x, const S2Point& a, const S2Point& b, +// dd: changed return type to int because on new clang we get: +// s2/s2edge_distances.cc:282:11: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical] +int UpdateMinDistance(const S2Point& x, const S2Point& a, const S2Point& b, S1ChordAngle* min_dist) { return AlwaysUpdateMinDistance(x, a, b, min_dist); } diff --git a/src/s2/s2edge_distances.h b/src/s2/s2edge_distances.h index 57df6f3f..abda3112 100644 --- a/src/s2/s2edge_distances.h +++ b/src/s2/s2edge_distances.h @@ -61,8 +61,8 @@ bool IsDistanceLess(const S2Point& x, const S2Point& a, const S2Point& b, // because (1) using S1ChordAngle is much faster than S1Angle, and (2) it // can save a lot of work by not actually computing the distance when it is // obviously larger than the current minimum. -bool UpdateMinDistance(const S2Point& x, const S2Point& a, const S2Point& b, - S1ChordAngle* min_dist); +int UpdateMinDistance(const S2Point& x, const S2Point& a, const S2Point& b, + S1ChordAngle* min_dist); // If the maximum distance from X to the edge AB is greater than "max_dist", // this method updates "max_dist" and returns true. Otherwise it returns false. From cb64ef21dbc8915bb0b0b2486f7ac679741ad0ac Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Sat, 14 May 2022 19:58:33 -0300 Subject: [PATCH 2/2] fix #153 --- src/absl/strings/internal/str_format/parser.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/absl/strings/internal/str_format/parser.cc b/src/absl/strings/internal/str_format/parser.cc index f308d023..4bed77f2 100644 --- a/src/absl/strings/internal/str_format/parser.cc +++ b/src/absl/strings/internal/str_format/parser.cc @@ -1,3 +1,4 @@ +#include "cpp-compat.h" // Copyright 2020 The Abseil Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -80,7 +81,7 @@ bool CheckFastPathSetting(const UnboundConversion& conv) { (conv.width.value() == -1) && (conv.precision.value() == -1); if (should_be_basic != conv.flags.basic) { - fprintf(stderr, + cpp_compat_printf( "basic=%d left=%d show_pos=%d sign_col=%d alt=%d zero=%d " "width=%d precision=%d\n", conv.flags.basic, conv.flags.left, conv.flags.show_pos,