From: Gabe Black Date: Sat, 9 Feb 2019 12:01:48 +0000 (-0800) Subject: systemc: Change the type of a loop counter to avoid a warning. X-Git-Tag: v19.0.0.0~1162 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bdef435d948a95207095fd1ee6359bdb622935f1;p=gem5.git systemc: Change the type of a loop counter to avoid a warning. g++ complained about comparing an signed int loop counter with the return value of a size() function. This change changes it to an unsigned to make g++ happy/quiet. Change-Id: I28fa79c448465b24d77b5623860f9b991f313561 Reviewed-on: https://gem5-review.googlesource.com/c/16286 Reviewed-by: Jason Lowe-Power Maintainer: Gabe Black --- diff --git a/src/systemc/ext/core/sc_port.hh b/src/systemc/ext/core/sc_port.hh index 2a454f3a0..99e7ace2d 100644 --- a/src/systemc/ext/core/sc_port.hh +++ b/src/systemc/ext/core/sc_port.hh @@ -230,7 +230,7 @@ class sc_port_b : public sc_port_base { IF *interface = dynamic_cast(iface); sc_assert(interface); - for (int i = 0; i < _interfaces.size(); i++) { + for (unsigned i = 0; i < _interfaces.size(); i++) { if (interface == _interfaces[i]) { report_error(SC_ID_BIND_IF_TO_PORT_, "interface already bound to port");