From ca6b5daca1ccc58007b6ebd2cbc7234b616db101 Mon Sep 17 00:00:00 2001 From: ser1zw Date: Sun, 18 Sep 2011 06:14:06 +0900 Subject: [PATCH] changed some functions to suppress warnings --- ext/opencv/cverror.cpp | 2 +- ext/opencv/cvmat.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/opencv/cverror.cpp b/ext/opencv/cverror.cpp index a2e3ff7..fd9232d 100644 --- a/ext/opencv/cverror.cpp +++ b/ext/opencv/cverror.cpp @@ -154,7 +154,7 @@ by_code(int error_code) void raise(cv::Exception e) { - rb_raise(by_code(e.code), e.what()); + rb_raise(by_code(e.code), "%s", e.what()); } __NAMESPACE_END_CVERROR diff --git a/ext/opencv/cvmat.cpp b/ext/opencv/cvmat.cpp index 10e0f88..47bf2d6 100644 --- a/ext/opencv/cvmat.cpp +++ b/ext/opencv/cvmat.cpp @@ -3449,7 +3449,7 @@ rb_canny(int argc, VALUE *argv, VALUE self) VALUE rb_pre_corner_detect(int argc, VALUE *argv, VALUE self) { - VALUE aperture_size, dest; + VALUE aperture_size, dest = Qnil; if (rb_scan_args(argc, argv, "01", &aperture_size) < 1) aperture_size = INT2FIX(3);