Skip to content
This repository was archived by the owner on Dec 3, 2021. It is now read-only.

Commit a3e1078

Browse files
committed
modified cvcontourtree.cpp, cvfont.h, iplconvkernel.cpp to suppress warnings
1 parent b6eebd4 commit a3e1078

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

ext/opencv/cvcontourtree.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ rb_contour(int argc, VALUE *argv, VALUE self)
7878
{
7979
VALUE criteria, storage;
8080
rb_scan_args(argc, argv, "01", &criteria);
81-
CvSeq *contour = cvContourFromContourTree(CVCONTOURTREE(self), CVMEMSTORAGE(storage), VALUE_TO_CVTERMCRITERIA(criteria));
81+
storage = cCvMemStorage::new_object();
82+
CvSeq *contour = cvContourFromContourTree(CVCONTOURTREE(self), CVMEMSTORAGE(storage),
83+
VALUE_TO_CVTERMCRITERIA(criteria));
8284
return cCvSeq::new_sequence(cCvContour::rb_class(), contour, cCvPoint::rb_class(), storage);
8385
}
8486

ext/opencv/cvfont.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ __NAMESPACE_BEGIN_CVFONT
2424
#define FO_VSCALE(op) NUM2DBL(rb_hash_aref(op, ID2SYM(rb_intern("vscale"))))
2525
#define FO_SHEAR(op) NUM2DBL(rb_hash_aref(op, ID2SYM(rb_intern("shear"))))
2626
#define FO_THICKNESS(op) FIX2INT(rb_hash_aref(op, ID2SYM(rb_intern("thickness"))))
27-
#define FO_LINE_TYPE(op) FIX2INT(rb_hash_aref(op, ID2SYM(rb_intern("line_type"))) == ID2SYM("aa") ? INT2FIX(CV_AA) : rb_hash_aref(op, ID2SYM(rb_intern("line_type"))))
27+
#define FO_LINE_TYPE(op) FIX2INT(rb_hash_aref(op, ID2SYM(rb_intern("line_type"))))
2828

2929

3030
VALUE rb_class();

ext/opencv/iplconvkernel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ rb_initialize(int argc, VALUE *argv, VALUE self)
8989
int _cols = NUM2INT(cols);
9090
int _rows = NUM2INT(rows);
9191
int num_values;
92-
int *_values;
92+
int *_values = NULL;
9393
const int INVALID_SHAPE = -1;
9494

9595
shape_type = CVMETHOD("STRUCTURING_ELEMENT_SHAPE", shape, INVALID_SHAPE);

0 commit comments

Comments
 (0)