Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2342a3ee authored by Chih-Hung Hsieh's avatar Chih-Hung Hsieh Committed by Abhisek Devkota
Browse files

Fix build with clang

This fixes some type confusions and some checks for conditions that
can't happen.

Change-Id: If50e7af175d58c0352536071bb3752f3d063c349
parent 43c10205
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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);
        }
+1 −1
Original line number Diff line number Diff line
@@ -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) {
+1 −1
Original line number Diff line number Diff line
@@ -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__);