From: Tomasz Swierczek Date: Thu, 26 Jan 2023 09:43:32 +0000 (+0100) Subject: Fix static analysis X-Git-Tag: accepted/tizen/7.0/unified/20230203.164156^0 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fsecurity%2Fdrm-service-core-tizen.git;a=commitdiff_plain;h=2851b12e63f743faa99ebdf83aa7b685b4e0d279 Fix static analysis * %lld instead of %ld for long long printf specifiers * proper %ld for drmgettid() output Change-Id: I44c809ab015f6a59d8e560979863b860e699b51f --- diff --git a/tadcore/DrmFileHandleMgr/DrmFileHandler.cpp b/tadcore/DrmFileHandleMgr/DrmFileHandler.cpp index 07b3735..0a1730c 100644 --- a/tadcore/DrmFileHandleMgr/DrmFileHandler.cpp +++ b/tadcore/DrmFileHandleMgr/DrmFileHandler.cpp @@ -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(); diff --git a/tappsd/src/intf/drm_intf_tapps.cpp b/tappsd/src/intf/drm_intf_tapps.cpp index 2af4fb0..f2a2d5b 100644 --- a/tappsd/src/intf/drm_intf_tapps.cpp +++ b/tappsd/src/intf/drm_intf_tapps.cpp @@ -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);