Fix static analysis 18/287318/2 accepted/tizen_7.0_unified tizen_7.0 accepted/tizen/7.0/unified/20230203.164156 accepted/tizen/unified/20230206.093839 accepted/tizen/unified/20230206.093955
authorTomasz Swierczek <t.swierczek@samsung.com>
Thu, 26 Jan 2023 09:43:32 +0000 (10:43 +0100)
committerTomasz Swierczek <t.swierczek@samsung.com>
Thu, 26 Jan 2023 12:22:44 +0000 (13:22 +0100)
* %lld instead of %ld for long long printf specifiers
* proper %ld for drmgettid() output

Change-Id: I44c809ab015f6a59d8e560979863b860e699b51f

tadcore/DrmFileHandleMgr/DrmFileHandler.cpp
tappsd/src/intf/drm_intf_tapps.cpp

index 07b3735..0a1730c 100644 (file)
@@ -159,7 +159,7 @@ int DrmFileHandler::Construct(const char *szDrmFilePath)
        m_plaintextSize = m_OriginEndOffset - m_PlaintextStartOffset;
 
        if (m_plaintextSize != t_DRMHeader.PlaintextSize) {
-               DRM_TAPPS_EXCEPTION("Error : plaintext file size incorrect. real = %ld, header = %ld",
+               DRM_TAPPS_EXCEPTION("Error : plaintext file size incorrect. real = %lld, header = %lld",
                                                        m_plaintextSize, t_DRMHeader.PlaintextSize);
                return TADC_FILE_OPEN_ERROR;
        }
@@ -183,18 +183,18 @@ int DrmFileHandler::Construct(const char *szDrmFilePath)
        DRM_TAPPS_LOG("m_pFilePath = %s", m_pFilePath);
 
        DRM_TAPPS_LOG("m_encryptionLevel = %ld", m_encryptionLevel);
-       DRM_TAPPS_LOG("m_encryptionRange = %ld", m_encryptionRange);
-       DRM_TAPPS_LOG("m_plaintextSize = %ld", m_plaintextSize);
+       DRM_TAPPS_LOG("m_encryptionRange = %lld", m_encryptionRange);
+       DRM_TAPPS_LOG("m_plaintextSize = %lld", m_plaintextSize);
 
-       DRM_TAPPS_LOG("m_PlaintextStartOffset = %ld", m_PlaintextStartOffset);
-       DRM_TAPPS_LOG("m_OriginEndOffset = %ld", m_OriginEndOffset);
+       DRM_TAPPS_LOG("m_PlaintextStartOffset = %d", m_PlaintextStartOffset);
+       DRM_TAPPS_LOG("m_OriginEndOffset = %lld", m_OriginEndOffset);
 
-       DRM_TAPPS_LOG("m_OriginCurOffset = %ld", m_OriginCurOffset);
-       DRM_TAPPS_LOG("m_DrmCurOffset = %ld", m_DrmCurOffset);
-       DRM_TAPPS_LOG("m_DrmEndOffset = %ld", m_DrmEndOffset);
+       DRM_TAPPS_LOG("m_OriginCurOffset = %lld", m_OriginCurOffset);
+       DRM_TAPPS_LOG("m_DrmCurOffset = %lld", m_DrmCurOffset);
+       DRM_TAPPS_LOG("m_DrmEndOffset = %lld", m_DrmEndOffset);
 
-       DRM_TAPPS_LOG("m_blockCnt = %ld", m_blockCnt);
-       DRM_TAPPS_LOG("m_curBlockIndex = %ld", m_curBlockIndex);
+       DRM_TAPPS_LOG("m_blockCnt = %lld", m_blockCnt);
+       DRM_TAPPS_LOG("m_curBlockIndex = %lld", m_curBlockIndex);
 
        DrmDecryptBlocks();
 
index 2af4fb0..f2a2d5b 100644 (file)
@@ -92,7 +92,7 @@ int dtapps_mutex_lock(dtappslockarg dtapps_mutex)
 {
        int retval = -1;
 
-       DRM_TAPPS_FRQ_LOG("MUT-LK-ULK Thread [%d] trying to lock the Mutex=0x%x",
+       DRM_TAPPS_FRQ_LOG("MUT-LK-ULK Thread [%ld] trying to lock the Mutex=0x%x",
                                          drmgettid(), dtapps_mutex);
 
        retval = pthread_mutex_lock(dtapps_mutex);
@@ -120,7 +120,7 @@ int dtapps_mutex_unlock(dtappslockarg dtapps_mutex)
 {
        int status = -1;
 
-       DRM_TAPPS_FRQ_LOG("MUT-LK-ULK Thread [%d] trying to unlock the Mutex=0x%x",
+       DRM_TAPPS_FRQ_LOG("MUT-LK-ULK Thread [%ld] trying to unlock the Mutex=0x%x",
                                          drmgettid(), dtapps_mutex);
 
        status = pthread_mutex_unlock(dtapps_mutex);