浏览代码

Fixes compiler warnings

Florian Eich 5 年之前
父节点
当前提交
7fa134ea15
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      matplotlibcpp.h

+ 2 - 2
matplotlibcpp.h

@@ -677,12 +677,12 @@ bool scatter(const std::vector<NumericX>& x,
 
 template< typename Numeric>
 bool bar(const std::vector<Numeric>& y, std::string ec = "black", std::string ls = "-", double lw = 1.0,
-         const std::map<std::string, std::string>& keywords = {})
+         __attribute__((unused)) const std::map<std::string, std::string>& keywords = {})
 {
     PyObject* yarray = get_array(y);
 
     std::vector<int> x;
-    for (int i = 0; i < y.size(); i++)
+    for (std::size_t i = 0; i < y.size(); i++)
         x.push_back(i);
 
     PyObject* xarray = get_array(x);