summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElektroschmock <elektroschmock78@googlemail.com>2020-04-30 21:01:10 +0200
committerElektroschmock <elektroschmock78@googlemail.com>2020-04-30 21:01:10 +0200
commit7d10f4b5c8aee61c3a5f2fb9acb97e6788bb33df (patch)
tree43853646aeaa4d4190886121e1b9c80882713453
parentd20c3f8949dabf0f5b174fa0022608c352adcb10 (diff)
downloadhardware_qcom_display-lineage-17.1.tar.gz
hardware_qcom_display-lineage-17.1.tar.bz2
hardware_qcom_display-lineage-17.1.zip
msm8084: libhwcomposer fix some warningslineage-17.1
warning: sizeof on array function parameter will return size of 'char *' instead of 'char []' [-Wsizeof-array-argument] Change-Id: I942b71499a47cde7cf8105a07c3e9cb45fe4e76a
-rw-r--r--msm8084/libhwcomposer/hwc_dump_layers.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/msm8084/libhwcomposer/hwc_dump_layers.cpp b/msm8084/libhwcomposer/hwc_dump_layers.cpp
index 641092f78..ad597d690 100644
--- a/msm8084/libhwcomposer/hwc_dump_layers.cpp
+++ b/msm8084/libhwcomposer/hwc_dump_layers.cpp
@@ -376,65 +376,65 @@ void HwcDebug::getHalPixelFormatStr(int format, char pixFormatStr[])
switch(format) {
case HAL_PIXEL_FORMAT_RGBA_8888:
- strlcpy(pixFormatStr, "RGBA_8888", sizeof(pixFormatStr));
+ strlcpy(pixFormatStr, "RGBA_8888", strlen(pixFormatStr));
break;
case HAL_PIXEL_FORMAT_RGBX_8888:
- strlcpy(pixFormatStr, "RGBX_8888", sizeof(pixFormatStr));
+ strlcpy(pixFormatStr, "RGBX_8888", strlen(pixFormatStr));
break;
case HAL_PIXEL_FORMAT_RGB_888:
- strlcpy(pixFormatStr, "RGB_888", sizeof(pixFormatStr));
+ strlcpy(pixFormatStr, "RGB_888", strlen(pixFormatStr));
break;
case HAL_PIXEL_FORMAT_RGB_565:
- strlcpy(pixFormatStr, "RGB_565", sizeof(pixFormatStr));
+ strlcpy(pixFormatStr, "RGB_565", strlen(pixFormatStr));
break;
case HAL_PIXEL_FORMAT_BGRA_8888:
- strlcpy(pixFormatStr, "BGRA_8888", sizeof(pixFormatStr));
+ strlcpy(pixFormatStr, "BGRA_8888", strlen(pixFormatStr));
break;
case HAL_PIXEL_FORMAT_YV12:
- strlcpy(pixFormatStr, "YV12", sizeof(pixFormatStr));
+ strlcpy(pixFormatStr, "YV12", strlen(pixFormatStr));
break;
case HAL_PIXEL_FORMAT_YCbCr_422_SP:
- strlcpy(pixFormatStr, "YCbCr_422_SP_NV16", sizeof(pixFormatStr));
+ strlcpy(pixFormatStr, "YCbCr_422_SP_NV16", strlen(pixFormatStr));
break;
case HAL_PIXEL_FORMAT_YCrCb_420_SP:
- strlcpy(pixFormatStr, "YCrCb_420_SP_NV21", sizeof(pixFormatStr));
+ strlcpy(pixFormatStr, "YCrCb_420_SP_NV21", strlen(pixFormatStr));
break;
case HAL_PIXEL_FORMAT_YCbCr_422_I:
- strlcpy(pixFormatStr, "YCbCr_422_I_YUY2", sizeof(pixFormatStr));
+ strlcpy(pixFormatStr, "YCbCr_422_I_YUY2", strlen(pixFormatStr));
break;
case HAL_PIXEL_FORMAT_YCrCb_422_I:
- strlcpy(pixFormatStr, "YCrCb_422_I_YVYU", sizeof(pixFormatStr));
+ strlcpy(pixFormatStr, "YCrCb_422_I_YVYU", strlen(pixFormatStr));
break;
case HAL_PIXEL_FORMAT_NV12_ENCODEABLE:
- strlcpy(pixFormatStr, "NV12_ENCODEABLE", sizeof(pixFormatStr));
+ strlcpy(pixFormatStr, "NV12_ENCODEABLE", strlen(pixFormatStr));
break;
case HAL_PIXEL_FORMAT_YCbCr_420_SP_TILED:
strlcpy(pixFormatStr, "YCbCr_420_SP_TILED_TILE_4x2",
- sizeof(pixFormatStr));
+ strlen(pixFormatStr));
break;
case HAL_PIXEL_FORMAT_YCbCr_420_SP:
- strlcpy(pixFormatStr, "YCbCr_420_SP", sizeof(pixFormatStr));
+ strlcpy(pixFormatStr, "YCbCr_420_SP", strlen(pixFormatStr));
break;
case HAL_PIXEL_FORMAT_YCrCb_420_SP_ADRENO:
- strlcpy(pixFormatStr, "YCrCb_420_SP_ADRENO", sizeof(pixFormatStr));
+ strlcpy(pixFormatStr, "YCrCb_420_SP_ADRENO", strlen(pixFormatStr));
break;
case HAL_PIXEL_FORMAT_YCrCb_422_SP:
- strlcpy(pixFormatStr, "YCrCb_422_SP", sizeof(pixFormatStr));
+ strlcpy(pixFormatStr, "YCrCb_422_SP", strlen(pixFormatStr));
break;
case HAL_PIXEL_FORMAT_R_8:
- strlcpy(pixFormatStr, "R_8", sizeof(pixFormatStr));
+ strlcpy(pixFormatStr, "R_8", strlen(pixFormatStr));
break;
case HAL_PIXEL_FORMAT_RG_88:
- strlcpy(pixFormatStr, "RG_88", sizeof(pixFormatStr));
+ strlcpy(pixFormatStr, "RG_88", strlen(pixFormatStr));
break;
case HAL_PIXEL_FORMAT_INTERLACE:
- strlcpy(pixFormatStr, "INTERLACE", sizeof(pixFormatStr));
+ strlcpy(pixFormatStr, "INTERLACE", strlen(pixFormatStr));
break;
case HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS:
- strlcpy(pixFormatStr, "YCbCr_420_SP_VENUS", sizeof(pixFormatStr));
+ strlcpy(pixFormatStr, "YCbCr_420_SP_VENUS", strlen(pixFormatStr));
break;
default:
- size_t len = sizeof(pixFormatStr);
+ size_t len = strlen(pixFormatStr);
snprintf(pixFormatStr, len, "Unknown0x%X", format);
break;
}