summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2014-11-07 17:18:31 -0800
committerAbhisek Devkota <ciwrl@cyanogenmod.com>2015-11-19 01:48:26 -0800
commit2342a3eee751bcb19a3fac25796f03c629409fe7 (patch)
treece6f960a3cbd077228f928dcc6726aa57e2c7836
parent43c102052abb968fab8552e719b6c6879ef76119 (diff)
Fix build with clang
This fixes some type confusions and some checks for conditions that can't happen. Change-Id: If50e7af175d58c0352536071bb3752f3d063c349
-rw-r--r--camera/QCameraHWI_Parm.cpp8
-rw-r--r--camera/mm-camera-interface/mm_camera_stream.c2
-rw-r--r--camera/mm-camera-interface/mm_omx_jpeg_encoder.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/camera/QCameraHWI_Parm.cpp b/camera/QCameraHWI_Parm.cpp
index d9c9810..6844538 100644
--- a/camera/QCameraHWI_Parm.cpp
+++ b/camera/QCameraHWI_Parm.cpp
@@ -3253,7 +3253,7 @@ status_t QCameraHardwareInterface::setCaptureBurstExp()
char burst_exp[PROPERTY_VALUE_MAX];
memset(burst_exp, 0, sizeof(burst_exp));
property_get("persist.capture.burst.exposures", burst_exp, "");
- if (NULL != burst_exp)
+ if (*burst_exp)
mParameters.set("capture-burst-exposures", burst_exp);
return NO_ERROR;
}
@@ -4051,7 +4051,7 @@ void QCameraHardwareInterface::initExifData(){
ALOGE("%s: getExifModel failed", __func__);
}
- if(mExifValues.dateTime) {
+ if(*mExifValues.dateTime) {
addExifTag(EXIFTAGID_EXIF_DATE_TIME_ORIGINAL, EXIF_ASCII,
20, 1, (void *)mExifValues.dateTime);
addExifTag(EXIFTAGID_EXIF_DATE_TIME_DIGITIZED, EXIF_ASCII,
@@ -4076,7 +4076,7 @@ void QCameraHardwareInterface::initExifData(){
if(mExifValues.mLatitude) {
addExifTag(EXIFTAGID_GPS_LATITUDE, EXIF_RATIONAL, 3, 1, (void *)mExifValues.latitude);
- if(mExifValues.latRef) {
+ if(*mExifValues.latRef) {
addExifTag(EXIFTAGID_GPS_LATITUDE_REF, EXIF_ASCII, 2,
1, (void *)mExifValues.latRef);
}
@@ -4085,7 +4085,7 @@ void QCameraHardwareInterface::initExifData(){
if(mExifValues.mLongitude) {
addExifTag(EXIFTAGID_GPS_LONGITUDE, EXIF_RATIONAL, 3, 1, (void *)mExifValues.longitude);
- if(mExifValues.lonRef) {
+ if(*mExifValues.lonRef) {
addExifTag(EXIFTAGID_GPS_LONGITUDE_REF, EXIF_ASCII, 2,
1, (void *)mExifValues.lonRef);
}
diff --git a/camera/mm-camera-interface/mm_camera_stream.c b/camera/mm-camera-interface/mm_camera_stream.c
index e7d2c84..ba60bcd 100644
--- a/camera/mm-camera-interface/mm_camera_stream.c
+++ b/camera/mm-camera-interface/mm_camera_stream.c
@@ -270,7 +270,7 @@ int32_t mm_camera_util_private_s_ctrl(int32_t fd, uint32_t id, int32_t value)
memset(&v4l2_ioctl, 0, sizeof(v4l2_ioctl));
v4l2_ioctl.id = id;
- v4l2_ioctl.ioctl_ptr = value;
+ v4l2_ioctl.ioctl_ptr = (void*)value;
rc = ioctl (fd, MSM_CAM_V4L2_IOCTL_PRIVATE_S_CTRL, &v4l2_ioctl);
if(rc) {
diff --git a/camera/mm-camera-interface/mm_omx_jpeg_encoder.c b/camera/mm-camera-interface/mm_omx_jpeg_encoder.c
index 2e628bf..a69140b 100644
--- a/camera/mm-camera-interface/mm_omx_jpeg_encoder.c
+++ b/camera/mm-camera-interface/mm_omx_jpeg_encoder.c
@@ -724,7 +724,7 @@ void omxJpegAbort()
ALOGV("%s: encoding=%d", __func__, encoding);
if (encoding) {
encoding = 0;
- OMX_SendCommand(pHandle, OMX_CommandFlush, NULL, NULL);
+ OMX_SendCommand(pHandle, OMX_CommandFlush, 0, NULL);
ALOGV("%s:waitForEvent: OMX_CommandFlush", __func__);
waitForEvent(OMX_EVENT_JPEG_ABORT, 0, 0);
ALOGV("%s:waitForEvent: OMX_CommandFlush: DONE", __func__);