From 51fb4f289c2e8e745adc05ac65a98aa89a465867 Mon Sep 17 00:00:00 2001 From: Nikolai Merinov Date: Tue, 5 Feb 2019 12:54:03 +0300 Subject: [PATCH] Fix format string according clang warnings --- tadcore/DrmFileHandleMgr/DrmFileHandler.cpp | 20 +++---- tadcore/Svc/DrmTdcSvc.cpp | 8 +-- tappsd/src/db/DTapps2SqliteDB.cpp | 88 ++++++++++++++--------------- tappsd/src/intf/drm_intf_tapps.cpp | 6 +- tappsd/src/rights/DTapps2Rights.cpp | 4 +- tappsd/src/util/DTapps2Time.cpp | 2 +- 6 files changed, 64 insertions(+), 64 deletions(-) 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/tadcore/Svc/DrmTdcSvc.cpp b/tadcore/Svc/DrmTdcSvc.cpp index 58ed521..f42b631 100644 --- a/tadcore/Svc/DrmTdcSvc.cpp +++ b/tadcore/Svc/DrmTdcSvc.cpp @@ -464,7 +464,7 @@ bool DrmTdcGeneratePurchaseRequest(const char *pTADCFilepath, char *pReqBuf, size_t tmpLen = strlen((char *)ReqLicBuf); if (*pReqBufLen <= tmpLen) { - DRM_TAPPS_EXCEPTION("*pReqBufLen(%d) <= %d", *pReqBufLen, tmpLen); + DRM_TAPPS_EXCEPTION("*pReqBufLen(%d) <= %zu", *pReqBufLen, tmpLen); TADC_MEMFree_DRMHeader(&t_DRMHeader); return FALSE; } @@ -475,7 +475,7 @@ bool DrmTdcGeneratePurchaseRequest(const char *pTADCFilepath, char *pReqBuf, tmpLen = strlen((char *)t_DRMHeader.RIURL); if (*pLicenseUrlLen <= tmpLen) { - DRM_TAPPS_EXCEPTION("*pLicenseUrlLen(%d) <= %d", *pLicenseUrlLen, tmpLen); + DRM_TAPPS_EXCEPTION("*pLicenseUrlLen(%d) <= %zu", *pLicenseUrlLen, tmpLen); TADC_MEMFree_DRMHeader(&t_DRMHeader); return FALSE; } @@ -559,7 +559,7 @@ int DrmTdcGenerateLicenseRequest(const char *pRespBuf, unsigned int respBufLen, size_t tmpLen = strlen((char *)ReqROBuf); if (*pReqBufLen <= tmpLen) { - DRM_TAPPS_EXCEPTION("*pReqBufLen(%d) <= %d", *pReqBufLen, tmpLen); + DRM_TAPPS_EXCEPTION("*pReqBufLen(%d) <= %zu", *pReqBufLen, tmpLen); return TADC_MEMAlOC_ERROR; } @@ -569,7 +569,7 @@ int DrmTdcGenerateLicenseRequest(const char *pRespBuf, unsigned int respBufLen, tmpLen = strlen((char *)pt_ROAcqInfo->ROAcqURL); if (*pLicenseUrlLen <= tmpLen) { - DRM_TAPPS_EXCEPTION("*pLicenseUrlLen(%d) <= %d", *pLicenseUrlLen, tmpLen); + DRM_TAPPS_EXCEPTION("*pLicenseUrlLen(%d) <= %zu", *pLicenseUrlLen, tmpLen); return TADC_MEMAlOC_ERROR; } diff --git a/tappsd/src/db/DTapps2SqliteDB.cpp b/tappsd/src/db/DTapps2SqliteDB.cpp index d2f2584..3c8d349 100644 --- a/tappsd/src/db/DTapps2SqliteDB.cpp +++ b/tappsd/src/db/DTapps2SqliteDB.cpp @@ -90,13 +90,13 @@ BOOL DTappsDBOpen(void *&pDb, const char *CallingFun) if (it != g_dtapps_sqlite_connection_table.end()) { DRM_TAPPS_FRQ_LOG("Connection already exists.."); auto &pDBConnectionInfo = it->second; - DRM_TAPPS_FRQ_LOG("pDBConnectionInfo=[0x%x]", pDBConnectionInfo.get()); + DRM_TAPPS_FRQ_LOG("pDBConnectionInfo=[%p]", pDBConnectionInfo.get()); if (pDBConnectionInfo == NULL || pDBConnectionInfo->pDBConnection == NULL) return FALSE; DRM_TAPPS_FRQ_LOG("pDBConnectionInfo->countOpenConnection=[%d], " - "pDBConnectionInfo->pDBConnection=[0x%x]", + "pDBConnectionInfo->pDBConnection=[%p]", pDBConnectionInfo->countOpenConnection, pDBConnectionInfo->pDBConnection); @@ -122,7 +122,7 @@ BOOL DTappsDBOpen(void *&pDb, const char *CallingFun) return FALSE; } - DRM_TAPPS_FRQ_LOG("sqlite3_open() is success. h_db:%x", h_db); + DRM_TAPPS_FRQ_LOG("sqlite3_open() is success. h_db:%p", h_db); pDBConnectionInfo->countOpenConnection = 1; pDBConnectionInfo->pDBConnection = h_db; @@ -131,7 +131,7 @@ BOOL DTappsDBOpen(void *&pDb, const char *CallingFun) // Insert the node DRM_TAPPS_FRQ_LOG("pDBConnectionInfo->countOpenConnection=[%d], " - "pDBConnectionInfo->pDBConnection=[0x%x]", + "pDBConnectionInfo->pDBConnection=[%p]", pDBConnectionInfo->countOpenConnection, pDBConnectionInfo->pDBConnection); @@ -162,7 +162,7 @@ BOOL DTappsDBGet(void *&pDBConnection) return FALSE; auto &pDBConnectionInfo = it->second; - DRM_TAPPS_FRQ_LOG("countOpenConnection=[%d], pDBConnection=[0x%x]", + DRM_TAPPS_FRQ_LOG("countOpenConnection=[%d], pDBConnection=[%p]", pDBConnectionInfo->countOpenConnection, pDBConnectionInfo->pDBConnection); @@ -190,7 +190,7 @@ BOOL DTappsDBClose(const char *CallingFun) } auto &pDBConnectionInfo = it->second; - DRM_TAPPS_FRQ_LOG("countOpenConnection=[%d], pDBConnection=[0x%x]", + DRM_TAPPS_FRQ_LOG("countOpenConnection=[%d], pDBConnection=[%p]", pDBConnectionInfo->countOpenConnection, pDBConnectionInfo->pDBConnection); @@ -205,17 +205,17 @@ BOOL DTappsDBClose(const char *CallingFun) sqlite3 *pDBConnection = it->second->pDBConnection; - DRM_TAPPS_LOG("finalizing all statements..pDBConnection=[0x%x]", pDBConnection); + DRM_TAPPS_LOG("finalizing all statements..pDBConnection=[%p]", pDBConnection); sqlite3_stmt *pstmt = NULL; while ((pstmt = sqlite3_next_stmt(pDBConnection, pstmt)) != NULL) { - DRM_TAPPS_LOG("finalizing DB statement..pstmt=[0x%x]", pstmt); + DRM_TAPPS_LOG("finalizing DB statement..pstmt=[%p]", pstmt); sqlite3_finalize(pstmt); } BOOL ret = TRUE; - DRM_TAPPS_LOG(" Closing DB connection..pDBConnection=[0x%x]", pDBConnection); + DRM_TAPPS_LOG(" Closing DB connection..pDBConnection=[%p]", pDBConnection); if (sqlite3_close(pDBConnection) != SQLITE_OK) { DRM_TAPPS_EXCEPTION("sqlite3_close failed. errmsg:%s", @@ -225,7 +225,7 @@ BOOL DTappsDBClose(const char *CallingFun) // erase map element regardless sqlite handle resource releasement // because it's not usable anymore. - DRM_TAPPS_LOG("erasing map entry..pDBConnection=[0x%x]", pDBConnection); + DRM_TAPPS_LOG("erasing map entry..pDBConnection=[%p]", pDBConnection); g_dtapps_sqlite_connection_table.erase(it); return ret; @@ -247,13 +247,13 @@ BOOL DTappsDBBeginImmedTrans(const char *CallingFun) return FALSE; auto &pDBConnectionInfo = it->second; - DRM_TAPPS_FRQ_LOG("countOpenConnection=[%d], DBConnection=[0x%x]", + DRM_TAPPS_FRQ_LOG("countOpenConnection=[%d], DBConnection=[%p]", pDBConnectionInfo->countOpenConnection, pDBConnectionInfo->pDBConnection); auto pDBConnection = pDBConnectionInfo->pDBConnection; - DRM_TAPPS_LOG("Beginning DB operations..pDBConnection=[0x%x]", pDBConnection); + DRM_TAPPS_LOG("Beginning DB operations..pDBConnection=[%p]", pDBConnection); while (true) { DRM_TAPPS_LOG("START BEGIN"); @@ -263,7 +263,7 @@ BOOL DTappsDBBeginImmedTrans(const char *CallingFun) DRM_TAPPS_FRQ_LOG("START BEGIN rc=%d", rc); if (rc != SQLITE_OK) { - DRM_TAPPS_FRQ_LOG("pDBConnection=0x%x rc=%d ErrMsg:%s", pDBConnection, rc, + DRM_TAPPS_FRQ_LOG("pDBConnection=%p rc=%d ErrMsg:%s", pDBConnection, rc, sqlite3_errmsg(pDBConnection)); if (rc == SQLITE_BUSY) { @@ -272,13 +272,13 @@ BOOL DTappsDBBeginImmedTrans(const char *CallingFun) count_try_db++; if (count_try_db >= (int)__DTAPPS_DB_SQLITE_RETRY__) { - DRM_TAPPS_EXCEPTION("Error pDBConnection=0x%x rc=%d ErrMsg:%s", + DRM_TAPPS_EXCEPTION("Error pDBConnection=%p rc=%d ErrMsg:%s", pDBConnection, rc, sqlite3_errmsg(pDBConnection)); MTHROW_BL } } else { - DRM_TAPPS_EXCEPTION("Error pDBConnection=0x%x rc=%d ErrMsg:%s", + DRM_TAPPS_EXCEPTION("Error pDBConnection=%p rc=%d ErrMsg:%s", pDBConnection, rc, sqlite3_errmsg(pDBConnection)); MTHROW_BL @@ -289,13 +289,13 @@ BOOL DTappsDBBeginImmedTrans(const char *CallingFun) } } - DRM_TAPPS_LOG("This fn finishes successfully..pDBConnection=[0x%x]", + DRM_TAPPS_LOG("This fn finishes successfully..pDBConnection=[%p]", pDBConnection); return TRUE; MCATCH_B - DRM_TAPPS_EXCEPTION("This fn fails.. pDBConnection=[0x%x]", pDBConnection); + DRM_TAPPS_EXCEPTION("This fn fails.. pDBConnection=[%p]", pDBConnection); return FALSE; } @@ -314,13 +314,13 @@ BOOL DTappsDBCommit(const char *CallingFun) return FALSE; auto &pDBConnectionInfo = it->second; - DRM_TAPPS_FRQ_LOG("countOpenConnection=[%d], pDBConnection=[0x%x]", + DRM_TAPPS_FRQ_LOG("countOpenConnection=[%d], pDBConnection=[%p]", pDBConnectionInfo->countOpenConnection, pDBConnectionInfo->pDBConnection); auto pDBConnection = pDBConnectionInfo->pDBConnection; - DRM_TAPPS_LOG("Commiting DB operations..pDBConnection=[0x%x]", pDBConnection); + DRM_TAPPS_LOG("Commiting DB operations..pDBConnection=[%p]", pDBConnection); while (true) { DRM_TAPPS_FRQ_LOG("START Commit"); @@ -328,7 +328,7 @@ BOOL DTappsDBCommit(const char *CallingFun) DRM_TAPPS_FRQ_LOG("START Commit rc=%d", rc); if (rc != SQLITE_OK) { - DRM_TAPPS_FRQ_LOG("pDBConnection=0x%x rc=%d ErrMsg:%s", pDBConnection, rc, + DRM_TAPPS_FRQ_LOG("pDBConnection=%p rc=%d ErrMsg:%s", pDBConnection, rc, sqlite3_errmsg(pDBConnection)); if (rc == SQLITE_BUSY) { @@ -337,13 +337,13 @@ BOOL DTappsDBCommit(const char *CallingFun) count_try_db_commit++; if (count_try_db_commit >= (int)__DTAPPS_DB_SQLITE_RETRY__) { - DRM_TAPPS_EXCEPTION("Error pDBConnection=0x%x rc=%d ErrMsg:%s", + DRM_TAPPS_EXCEPTION("Error pDBConnection=%p rc=%d ErrMsg:%s", pDBConnection, rc, sqlite3_errmsg(pDBConnection)); MTHROW_BL } } else { - DRM_TAPPS_EXCEPTION("Error pDBConnection=0x%x rc=%d ErrMsg:%s", + DRM_TAPPS_EXCEPTION("Error pDBConnection=%p rc=%d ErrMsg:%s", pDBConnection, rc, sqlite3_errmsg(pDBConnection)); MTHROW_BL @@ -355,12 +355,12 @@ BOOL DTappsDBCommit(const char *CallingFun) } } - DRM_TAPPS_LOG("Finishes successfully..pDBConnection=[0x%x]", pDBConnection); + DRM_TAPPS_LOG("Finishes successfully..pDBConnection=[%p]", pDBConnection); return TRUE; MCATCH_B - DRM_TAPPS_EXCEPTION("Fails.. pDBConnection=[0x%x]", pDBConnection); + DRM_TAPPS_EXCEPTION("Fails.. pDBConnection=[%p]", pDBConnection); return FALSE; } @@ -381,13 +381,13 @@ BOOL DTappsDBRollback(const char *CallingFun) return FALSE; auto &pDBConnectionInfo = it->second; - DRM_TAPPS_SECURE_LOG("[%s] countOpenConnection=[%d], pDBConnection=[0x%x]", + DRM_TAPPS_SECURE_LOG("[%s] countOpenConnection=[%d], pDBConnection=[%p]", __func__, pDBConnectionInfo->countOpenConnection, pDBConnectionInfo->pDBConnection); auto pDBConnection = pDBConnectionInfo->pDBConnection; - DRM_TAPPS_LOG("Rollback DB operations..pDBConnection=[0x%x]", pDBConnection); + DRM_TAPPS_LOG("Rollback DB operations..pDBConnection=[%p]", pDBConnection); while (true) { DRM_TAPPS_FRQ_LOG("START Rollback"); @@ -395,7 +395,7 @@ BOOL DTappsDBRollback(const char *CallingFun) DRM_TAPPS_FRQ_LOG("START Rollback rc=%d", rc); if (rc != SQLITE_OK) { - DRM_TAPPS_FRQ_LOG("pDBConnection=0x%x rc=%d ErrMsg:%s", pDBConnection, rc, + DRM_TAPPS_FRQ_LOG("pDBConnection=%p rc=%d ErrMsg:%s", pDBConnection, rc, sqlite3_errmsg(pDBConnection)); if (rc == SQLITE_BUSY) { @@ -404,13 +404,13 @@ BOOL DTappsDBRollback(const char *CallingFun) count_try_db_rollback++; if (count_try_db_rollback >= (int)__DTAPPS_DB_SQLITE_RETRY__) { - DRM_TAPPS_EXCEPTION("Error pDBConnection=0x%x rc=%d ErrMsg:%s", + DRM_TAPPS_EXCEPTION("Error pDBConnection=%p rc=%d ErrMsg:%s", pDBConnection, rc, sqlite3_errmsg(pDBConnection)); MTHROW_BL } } else { - DRM_TAPPS_EXCEPTION("Error pDBConnection=0x%x rc=%d ErrMsg:%s", + DRM_TAPPS_EXCEPTION("Error pDBConnection=%p rc=%d ErrMsg:%s", pDBConnection, rc, sqlite3_errmsg(pDBConnection)); MTHROW_BL @@ -422,13 +422,13 @@ BOOL DTappsDBRollback(const char *CallingFun) } } - DRM_TAPPS_LOG("This fn finishes successfully..pDBConnection=[0x%x]", + DRM_TAPPS_LOG("This fn finishes successfully..pDBConnection=[%p]", pDBConnection); return TRUE; MCATCH_B - DRM_TAPPS_EXCEPTION("This fn fails.. pDBConnection=[0x%x]", pDBConnection); + DRM_TAPPS_EXCEPTION("This fn fails.. pDBConnection=[%p]", pDBConnection); return FALSE; } @@ -452,13 +452,13 @@ BOOL DTappsExecuteSQL(void *pDB, const char *query) count_try_db_exe++; if (count_try_db_exe >= (int)__DTAPPS_DB_SQLITE_RETRY__) { - DRM_TAPPS_EXCEPTION("h_db=0x%x rc=%d ErrMsg:%s count_try_db_exe=%d", + DRM_TAPPS_EXCEPTION("h_db=%p rc=%d ErrMsg:%s count_try_db_exe=%d", h_db, rc, sqlite3_errmsg(h_db), count_try_db_exe); DRM_TAPPS_EXCEPTION("query=[%s]", query); return FALSE; } } else { - DRM_TAPPS_EXCEPTION("h_db=0x%x rc=%d ErrMsg:%s", h_db, rc, + DRM_TAPPS_EXCEPTION("h_db=%p rc=%d ErrMsg:%s", h_db, rc, sqlite3_errmsg(h_db)); DRM_TAPPS_EXCEPTION("query=[%s]", query); return FALSE; @@ -479,11 +479,11 @@ BOOL DTappsSQLGetTable(void *pDB, const char *query, int rc = 0; sqlite3 *h_db = (sqlite3 *)pDB; - DRM_TAPPS_FRQ_LOG("h_db=0x%x query=%s", h_db, query); + DRM_TAPPS_FRQ_LOG("h_db=%p query=%s", h_db, query); TAPPSDbApiLock Dblock; select_table->handle = h_db; - DRM_TAPPS_FRQ_LOG("select_table->handle=%x", select_table->handle); + DRM_TAPPS_FRQ_LOG("select_table->handle=%p", select_table->handle); int count_try_db_select = 0; @@ -502,7 +502,7 @@ BOOL DTappsSQLGetTable(void *pDB, const char *query, count_try_db_select++; if (count_try_db_select >= (int)__DTAPPS_DB_SQLITE_RETRY__) { - DRM_TAPPS_EXCEPTION("SELECT h_db=0x%x rc=%d ErrMsg:%s " + DRM_TAPPS_EXCEPTION("SELECT h_db=%p rc=%d ErrMsg:%s " "count_try_db_select=%d", h_db, rc, sqlite3_errmsg(h_db), count_try_db_select); @@ -511,7 +511,7 @@ BOOL DTappsSQLGetTable(void *pDB, const char *query, return FALSE; } } else { - DRM_TAPPS_EXCEPTION("SELECT h_db=0x%x rc=%d ErrMsg:%s", h_db, rc, + DRM_TAPPS_EXCEPTION("SELECT h_db=%p rc=%d ErrMsg:%s", h_db, rc, sqlite3_errmsg(h_db)); DRM_TAPPS_EXCEPTION("query=[%s]", query); @@ -566,22 +566,22 @@ void *DTappsStmtPrepare(void *pDB, const char *query) sqlite3 *h_db = (sqlite3 *)pDB; sqlite3_stmt *stmt = 0; - DRM_TAPPS_FRQ_LOG("h_db=0x%x query=%s", h_db, query); + DRM_TAPPS_FRQ_LOG("h_db=%p query=%s", h_db, query); TAPPSDbApiLock Dblock; if (0 == TAPPS_strnicmp(query, "SELECT", 6)) { - DRM_TAPPS_EXCEPTION("Doesn't support 'Select' query h_db=0x%x query=%s", + DRM_TAPPS_EXCEPTION("Doesn't support 'Select' query h_db=%p query=%s", h_db, query); return NULL; } rc = sqlite3_prepare(h_db, query, -1, &stmt, NULL); - DRM_TAPPS_FRQ_LOG("%s: rc=%d query=%s stmt=0x%x", __func__, rc, query, stmt); + DRM_TAPPS_FRQ_LOG("%s: rc=%d query=%s stmt=%p", __func__, rc, query, stmt); if (rc != SQLITE_OK) { - DRM_TAPPS_EXCEPTION("DTappsStmtPrepare: h_db=0x%x err: %s", h_db, + DRM_TAPPS_EXCEPTION("DTappsStmtPrepare: h_db=%p err: %s", h_db, sqlite3_errmsg(h_db)); DRM_TAPPS_EXCEPTION("DTappsStmtPrepare: query: %s", query); return NULL; @@ -673,7 +673,7 @@ int DTappsStmtExecute(void *pStmt) int CntTryStmtExe = 0, rc = -1; sqlite3_stmt *stmt = (sqlite3_stmt *)pStmt; - DRM_TAPPS_FRQ_LOG("%s:stmt=0x%x", __func__, stmt); + DRM_TAPPS_FRQ_LOG("%s:stmt=%p", __func__, stmt); TAPPSDbApiLock Dblock; @@ -695,12 +695,12 @@ int DTappsStmtExecute(void *pStmt) CntTryStmtExe++; if (CntTryStmtExe >= (int)__DTAPPS_DB_SQLITE_RETRY__) { - DRM_TAPPS_EXCEPTION("stmt=0x%x rc=%d CntTryStmtExe=%d", stmt, rc, + DRM_TAPPS_EXCEPTION("stmt=%p rc=%d CntTryStmtExe=%d", stmt, rc, CntTryStmtExe); return FALSE; } } else { - DRM_TAPPS_EXCEPTION("stmt=0x%x rc=%d", stmt, rc); + DRM_TAPPS_EXCEPTION("stmt=%p rc=%d", stmt, rc); return FALSE; } } else { diff --git a/tappsd/src/intf/drm_intf_tapps.cpp b/tappsd/src/intf/drm_intf_tapps.cpp index 2af4fb0..7c46bf7 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=%p", 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=%p", drmgettid(), dtapps_mutex); status = pthread_mutex_unlock(dtapps_mutex); @@ -145,7 +145,7 @@ void dtapps_sleep(unsigned int TimeInSec, unsigned int TimeInMicroSec) tv.tv_sec = TimeInSec; tv.tv_usec = TimeInMicroSec; - DRM_TAPPS_FRQ_LOG("TimeInSec =%u TimeInMicroSec=%u", tv.tv_sec, tv.tv_usec); + DRM_TAPPS_FRQ_LOG("TimeInSec =%ld TimeInMicroSec=%ld", tv.tv_sec, tv.tv_usec); retval = select(0, NULL, NULL, NULL, &tv); diff --git a/tappsd/src/rights/DTapps2Rights.cpp b/tappsd/src/rights/DTapps2Rights.cpp index b358350..517f8fa 100644 --- a/tappsd/src/rights/DTapps2Rights.cpp +++ b/tappsd/src/rights/DTapps2Rights.cpp @@ -54,7 +54,7 @@ int DTappsValidateConstraints(DTAPPS_CONSTRAINTS *st_const, retDeviceInfo = TADC_IF_GetDUID(DUID); if (retDeviceInfo < 0) { - DRM_TAPPS_EXCEPTION("Retrieve for DUID Failed!!! DUID = %s, duid_len = %d", + DRM_TAPPS_EXCEPTION("Retrieve for DUID Failed!!! DUID = %s, duid_len = %zu", DUID, strlen(DUID)); return TADC_LICENSE_UNKNOWN_ERROR; } @@ -293,7 +293,7 @@ int DTappsInstallLicense(const char *declicbuffer) time_gmt.tm_sec); if ((len == -1) || (len >= (int)sizeof(time_buffer))) { - DRM_TAPPS_EXCEPTION("snprintf failed , len = %d, sizeof(time_buffer) = %d", len, + DRM_TAPPS_EXCEPTION("snprintf failed , len = %d, sizeof(time_buffer) = %zu", len, sizeof(time_buffer)); ret = TADC_MEMAlOC_ERROR; goto Error_Exit; diff --git a/tappsd/src/util/DTapps2Time.cpp b/tappsd/src/util/DTapps2Time.cpp index 469cb9f..3d4c73c 100644 --- a/tappsd/src/util/DTapps2Time.cpp +++ b/tappsd/src/util/DTapps2Time.cpp @@ -131,7 +131,7 @@ BOOL DTappsGetSecureTime(time_t *seconds) DTAPPS_GMTIME_THREAD_SAFE(&secure_sec, &gm_fmt); *seconds = DTAPPS_MKTIME(&gm_fmt); - DRM_TAPPS_LOG("now = %d, secure_sec = %d, seconds(SecureTime in GMT) = %d", now, + DRM_TAPPS_LOG("now = %ld, secure_sec = %ld, seconds(SecureTime in GMT) = %ld", now, secure_sec, *seconds); return TRUE; -- 2.7.4