Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
5474935a
Commit
5474935a
authored
Jan 28, 2014
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes for defects from code coverity
parent
fff5a6c0
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
7 deletions
+8
-7
ocl.cpp
modules/core/src/ocl.cpp
+2
-1
filter.cpp
modules/imgproc/src/filter.cpp
+1
-1
gen_java.py
modules/java/generator/gen_java.py
+2
-2
Mat.cpp
modules/java/generator/src/cpp/Mat.cpp
+1
-1
utils.cpp
modules/java/generator/src/cpp/utils.cpp
+2
-2
No files found.
modules/core/src/ocl.cpp
View file @
5474935a
...
@@ -3673,6 +3673,7 @@ struct PlatformInfo2::Impl
...
@@ -3673,6 +3673,7 @@ struct PlatformInfo2::Impl
{
{
Impl
(
void
*
id
)
Impl
(
void
*
id
)
{
{
refcount
=
1
;
handle
=
*
(
cl_platform_id
*
)
id
;
handle
=
*
(
cl_platform_id
*
)
id
;
getDevices
(
devices
,
handle
);
getDevices
(
devices
,
handle
);
}
}
...
@@ -3713,7 +3714,7 @@ int PlatformInfo2::deviceNumber() const
...
@@ -3713,7 +3714,7 @@ int PlatformInfo2::deviceNumber() const
void
PlatformInfo2
::
getDevice
(
Device
&
device
,
int
d
)
const
void
PlatformInfo2
::
getDevice
(
Device
&
device
,
int
d
)
const
{
{
CV_Assert
(
d
<
(
int
)
p
->
devices
.
size
()
);
CV_Assert
(
p
&&
d
<
(
int
)
p
->
devices
.
size
()
);
if
(
p
)
if
(
p
)
device
.
set
(
p
->
devices
[
d
]);
device
.
set
(
p
->
devices
[
d
]);
}
}
...
...
modules/imgproc/src/filter.cpp
View file @
5474935a
...
@@ -3508,7 +3508,7 @@ static bool ocl_sepFilter2D( InputArray _src, OutputArray _dst, int ddepth,
...
@@ -3508,7 +3508,7 @@ static bool ocl_sepFilter2D( InputArray _src, OutputArray _dst, int ddepth,
int
type
=
_src
.
type
();
int
type
=
_src
.
type
();
if
(
!
(
(
CV_8UC1
==
type
||
CV_8UC4
==
type
||
CV_32FC1
==
type
||
CV_32FC4
==
type
)
&&
if
(
!
(
(
CV_8UC1
==
type
||
CV_8UC4
==
type
||
CV_32FC1
==
type
||
CV_32FC4
==
type
)
&&
(
ddepth
==
CV_32F
||
ddepth
==
CV_8U
)
)
)
(
ddepth
==
CV_32F
||
ddepth
==
CV_8U
||
ddepth
<
0
)
)
)
return
false
;
return
false
;
int
cn
=
CV_MAT_CN
(
type
);
int
cn
=
CV_MAT_CN
(
type
);
...
...
modules/java/generator/gen_java.py
View file @
5474935a
...
@@ -398,7 +398,7 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1minMaxLocManual
...
@@ -398,7 +398,7 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1minMaxLocManual
return result;
return result;
} catch(c
v::Exception
e) {
} catch(c
onst cv::Exception&
e) {
LOGD("Core::n_1minMaxLoc() catched cv::Exception:
%
s", e.what());
LOGD("Core::n_1minMaxLoc() catched cv::Exception:
%
s", e.what());
jclass je = env->FindClass("org/opencv/core/CvException");
jclass je = env->FindClass("org/opencv/core/CvException");
if(!je) je = env->FindClass("java/lang/Exception");
if(!je) je = env->FindClass("java/lang/Exception");
...
@@ -471,7 +471,7 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1getTextSize
...
@@ -471,7 +471,7 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1getTextSize
return result;
return result;
} catch(c
v::Exception
e) {
} catch(c
onst cv::Exception&
e) {
LOGD("Core::n_1getTextSize() catched cv::Exception:
%
s", e.what());
LOGD("Core::n_1getTextSize() catched cv::Exception:
%
s", e.what());
jclass je = env->FindClass("org/opencv/core/CvException");
jclass je = env->FindClass("org/opencv/core/CvException");
if(!je) je = env->FindClass("java/lang/Exception");
if(!je) je = env->FindClass("java/lang/Exception");
...
...
modules/java/generator/src/cpp/Mat.cpp
View file @
5474935a
...
@@ -467,7 +467,7 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1dims
...
@@ -467,7 +467,7 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1dims
LOGD
(
"%s"
,
method_name
);
LOGD
(
"%s"
,
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
return
me
->
dims
;
return
me
->
dims
;
}
catch
(
c
v
::
Exception
e
)
{
}
catch
(
c
onst
cv
::
Exception
&
e
)
{
throwJavaException
(
env
,
&
e
,
method_name
);
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(...)
{
}
catch
(...)
{
throwJavaException
(
env
,
0
,
method_name
);
throwJavaException
(
env
,
0
,
method_name
);
...
...
modules/java/generator/src/cpp/utils.cpp
View file @
5474935a
...
@@ -48,7 +48,7 @@ JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nBitmapToMat2
...
@@ -48,7 +48,7 @@ JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nBitmapToMat2
}
}
AndroidBitmap_unlockPixels
(
env
,
bitmap
);
AndroidBitmap_unlockPixels
(
env
,
bitmap
);
return
;
return
;
}
catch
(
c
v
::
Exception
e
)
{
}
catch
(
c
onst
cv
::
Exception
&
e
)
{
AndroidBitmap_unlockPixels
(
env
,
bitmap
);
AndroidBitmap_unlockPixels
(
env
,
bitmap
);
LOGE
(
"nBitmapToMat catched cv::Exception: %s"
,
e
.
what
());
LOGE
(
"nBitmapToMat catched cv::Exception: %s"
,
e
.
what
());
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
...
@@ -130,7 +130,7 @@ JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nMatToBitmap2
...
@@ -130,7 +130,7 @@ JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nMatToBitmap2
}
}
AndroidBitmap_unlockPixels
(
env
,
bitmap
);
AndroidBitmap_unlockPixels
(
env
,
bitmap
);
return
;
return
;
}
catch
(
c
v
::
Exception
e
)
{
}
catch
(
c
onst
cv
::
Exception
&
e
)
{
AndroidBitmap_unlockPixels
(
env
,
bitmap
);
AndroidBitmap_unlockPixels
(
env
,
bitmap
);
LOGE
(
"nMatToBitmap catched cv::Exception: %s"
,
e
.
what
());
LOGE
(
"nMatToBitmap catched cv::Exception: %s"
,
e
.
what
());
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment