RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: libtpm Date: 05-Sep-2014 21:45:55 Branch: HEAD Handle: 2014090519455301 Modified files: libtpm/libtpm/lib tpmutil.c libtpm/tpm Makefile.am tpm_daa.c tpm_init.c tpm_io.c tpm_pcr.c tpm_permanent.c tpm_platform.c tpm_process.c tpm_transport.c Log: - liptpm: remove clang warnings. Summary: Revision Changes Path 1.12 +2 -2 libtpm/libtpm/lib/tpmutil.c 1.6 +1 -1 libtpm/tpm/Makefile.am 1.3 +33 -33 libtpm/tpm/tpm_daa.c 1.2 +212 -55 libtpm/tpm/tpm_init.c 1.2 +38 -122 libtpm/tpm/tpm_io.c 1.3 +2 -2 libtpm/tpm/tpm_pcr.c 1.2 +77 -37 libtpm/tpm/tpm_permanent.c 1.2 +4 -4 libtpm/tpm/tpm_platform.c 1.2 +139 -66 libtpm/tpm/tpm_process.c 1.3 +1 -1 libtpm/tpm/tpm_transport.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: libtpm/libtpm/lib/tpmutil.c ============================================================================ $ cvs diff -u -r1.11 -r1.12 tpmutil.c --- libtpm/libtpm/lib/tpmutil.c 23 Sep 2013 17:43:24 -0000 1.11 +++ libtpm/libtpm/lib/tpmutil.c 5 Sep 2014 19:45:53 -0000 1.12 @@ -594,7 +594,7 @@ byte = 0; len16 = (uint16_t) va_arg(argp, int); dummy = va_arg(argp, int); - dummy = dummy; /* make compiler happy */ + (void)dummy; /* make compiler happy */ if (totlen + len16 >= tb->size) { ret = ERR_BUFFER; goto exit; @@ -731,7 +731,7 @@ break; case 'X': tmp = (uint32_t) va_arg(argp, int); - tmp = tmp; /* make compiler happy */ + (void)tmp; /* make compiler happy */ l = (uint32_t *) va_arg(argp, unsigned long *); ret = tpm_buffer_load32(tb, offset, l); if (ret & ERR_MASK) @@ . patch -p0 <<'@@ .' Index: libtpm/tpm/Makefile.am ============================================================================ $ cvs diff -u -r1.5 -r1.6 Makefile.am --- libtpm/tpm/Makefile.am 11 Oct 2013 17:12:04 -0000 1.5 +++ libtpm/tpm/Makefile.am 5 Sep 2014 19:45:53 -0000 1.6 @@ -140,7 +140,7 @@ sbin_PROGRAMS = ibmtpmd ibmtpmd_SOURCES = tpm_server.c ibmtpmd_LDADD = libtpmd.la $(CRYPTO_LINKLIBS) -ibmtpmd_LDFLAGS = --all-static $(LDFLAGS) +ibmtpmd_LDFLAGS = $(LDFLAGS) # --all-static #tpm_server: $(OBJFILES) # $(CC) $(OBJFILES) $(LNFLAGS) -o tpm_server @@ . patch -p0 <<'@@ .' Index: libtpm/tpm/tpm_daa.c ============================================================================ $ cvs diff -u -r1.2 -r1.3 tpm_daa.c --- libtpm/tpm/tpm_daa.c 17 Oct 2013 18:34:23 -0000 1.2 +++ libtpm/tpm/tpm_daa.c 5 Sep 2014 19:45:53 -0000 1.3 @@ -1363,7 +1363,7 @@ TPM_DIGEST signedDataDigest; printf("TPM_DAAJoin_Stage01:\n"); - outputData = outputData; /* not used */ + (void)outputData; /* not used */ /* a. Verify that DAA_session ->DAA_stage==1. Return TPM_DAA_STAGE and flush handle on mismatch */ /* NOTE Done by common code */ @@ -1479,8 +1479,8 @@ TPM_DIGEST signedDataDigest; printf("TPM_DAAJoin_Stage02:\n"); - outputData = outputData; /* not used */ - tpm_state = tpm_state; /* not used */ + (void)outputData; /* not used */ + (void)tpm_state; /* not used */ TPM_Sbuffer_Init(&signedDataSbuffer); /* freed @1*/ /* a. Verify that DAA_session ->DAA_stage==2. Return TPM_DAA_STAGE and flush handle on @@ -1582,8 +1582,8 @@ uint32_t stream_size; printf("TPM_DAAJoin_Stage03:\n"); - tpm_state = tpm_state; /* not used */ - outputData = outputData; /* not used */ + (void)tpm_state; /* not used */ + (void)outputData; /* not used */ /* a. Verify that DAA_session ->DAA_stage==3. Return TPM_DAA_STAGE and flush handle on mismatch */ /* NOTE Done by common code */ @@ -1645,8 +1645,8 @@ TPM_BIGNUM rBignum = NULL; /* freed @4 */ printf("TPM_DAAJoin_Stage04:\n"); - tpm_state = tpm_state; /* not used */ - outputData = outputData; /* not used */ + (void)tpm_state; /* not used */ + (void)outputData; /* not used */ /* a. Verify that DAA_session ->DAA_stage==4. Return TPM_DAA_STAGE and flush handle on mismatch */ /* NOTE Done by common code */ @@ -1735,8 +1735,8 @@ TPM_BIGNUM zBignum = NULL; /* freed @5 */ printf("TPM_DAAJoin_Stage05:\n"); - tpm_state = tpm_state; /* not used */ - outputData = outputData; /* not used */ + (void)tpm_state; /* not used */ + (void)outputData; /* not used */ /* a. Verify that DAA_session ->DAA_stage==5. Return TPM_DAA_STAGE and flush handle on mismatch */ /* NOTE Done by common code */ @@ -1833,8 +1833,8 @@ TPM_BIGNUM yBignum = NULL; /* freed @4 */ printf("TPM_DAAJoin_Stage06:\n"); - tpm_state = tpm_state; /* not used */ - outputData = outputData; /* not used */ + (void)tpm_state; /* not used */ + (void)outputData; /* not used */ /* a. Verify that DAA_session ->DAA_stage==6. Return TPM_DAA_STAGE and flush handle on mismatch */ /* NOTE Done by common code */ @@ -1927,7 +1927,7 @@ TPM_BIGNUM zBignum = NULL; /* freed @4 */ printf("TPM_DAAJoin_Stage07:\n"); - tpm_state = tpm_state; /* not used */ + (void)tpm_state; /* not used */ /* a. Verify that DAA_session ->DAA_stage==7. Return TPM_DAA_STAGE and flush handle on mismatch */ /* NOTE Done by common code */ @@ -2097,8 +2097,8 @@ TPM_BIGNUM rBignum = NULL; /* freed @5 */ printf("TPM_DAAJoin_Stage09_Sign_Stage2:\n"); - tpm_state = tpm_state; /* not used */ - outputData = outputData; /* not used */ + (void)tpm_state; /* not used */ + (void)outputData; /* not used */ /* a. Verify that DAA_session ->DAA_stage==9. Return TPM_DAA_STAGE and flush handle on mismatch */ /* NOTE Done by common code */ @@ -2200,8 +2200,8 @@ TPM_BIGNUM yBignum = NULL; /* freed @5*/ printf("TPM_DAAJoin_Stage10_Sign_Stage3:\n"); - tpm_state = tpm_state; /* not used */ - outputData = outputData; /* not used */ + (void)tpm_state; /* not used */ + (void)outputData; /* not used */ /* a. Verify that DAA_session ->DAA_stage==10. Return TPM_DAA_STAGE and flush handle on mismatch h */ /* NOTE Done by common code */ @@ -2305,8 +2305,8 @@ TPM_BIGNUM zBignum = NULL; /* freed @5 */ printf("TPM_DAAJoin_Stage11_Sign_Stage4:\n"); - tpm_state = tpm_state; /* not used */ - outputData = outputData; /* not used */ + (void)tpm_state; /* not used */ + (void)outputData; /* not used */ /* a. Verify that DAA_session ->DAA_stage==11. Return TPM_DAA_STAGE and flush handle on mismatch */ /* NOTE Done by common code */ @@ -2410,7 +2410,7 @@ TPM_BIGNUM zBignum = NULL; /* freed @5 */ printf("TPM_DAAJoin_Stage12:\n"); - tpm_state = tpm_state; /* not used */ + (void)tpm_state; /* not used */ /* a. Verify that DAA_session ->DAA_stage==12. Return TPM_DAA_STAGE and flush handle on mismatch */ /* NOTE Done by common code */ @@ -2521,8 +2521,8 @@ TPM_BIGNUM w1Bignum = NULL; /* freed @4 */ printf("TPM_DAAJoin_Stage13_Sign_Stage6:\n"); - tpm_state = tpm_state; /* not used */ - outputData = outputData; /* not used */ + (void)tpm_state; /* not used */ + (void)outputData; /* not used */ /* a. Verify that DAA_session->DAA_stage==13. Return TPM_DAA_STAGE and flush handle on mismatch */ /* NOTE Done by common code */ @@ -2616,7 +2616,7 @@ unsigned int numBytes; /* for debug */ printf("TPM_DAAJoin_Stage14_Sign_Stage7:\n"); - tpm_state = tpm_state; /* not used */ + (void)tpm_state; /* not used */ /* a. Verify that DAA_session ->DAA_stage==14. Return TPM_DAA_STAGE and flush handle on mismatch */ /* NOTE Done by common code */ @@ -2714,7 +2714,7 @@ TPM_BIGNUM wBignum = NULL; /* freed @10 */ printf("TPM_DAAJoin_Stage15_Sign_Stage8:\n"); - tpm_state = tpm_state; /* not used */ + (void)tpm_state; /* not used */ /* a. Verify that DAA_session ->DAA_stage==15. Return TPM_DAA_STAGE and flush handle on mismatch */ /* NOTE Done by common code */ @@ -2849,7 +2849,7 @@ unsigned char *nt = NULL; /* freed @1 */ printf("TPM_DAAJoin_Stage16_Sign_Stage9:\n"); - tpm_state = tpm_state; /* not used */ + (void)tpm_state; /* not used */ /* a. Verify that DAA_session ->DAA_stage==16. Return TPM_DAA_STAGE and flush handle on mismatch */ /* NOTE Done by common code */ @@ -2908,7 +2908,7 @@ TPM_BIGNUM cBignum = NULL; /* freed @5 */ printf("TPM_DAAJoin_Stage17_Sign_Stage11:\n"); - tpm_state = tpm_state; /* not used */ + (void)tpm_state; /* not used */ /* a. Verify that DAA_session ->DAA_stage==17. Return TPM_DAA_STAGE and flush handle on mismatch */ /* NOTE Done by common code */ @@ -2989,7 +2989,7 @@ TPM_BIGNUM cBignum = NULL; /* freed @6 */ printf("TPM_DAAJoin_Stage18_Sign_Stage12:\n"); - tpm_state = tpm_state; /* not used */ + (void)tpm_state; /* not used */ /* a. Verify that DAA_session ->DAA_stage==18. Return TPM_DAA_STAGE and flush handle on mismatch */ /* NOTE Done by common code */ @@ -3071,7 +3071,7 @@ TPM_BIGNUM u0Bignum = NULL; /* freed @5 */ printf("TPM_DAAJoin_Stage19:\n"); - tpm_state = tpm_state; /* not used */ + (void)tpm_state; /* not used */ /* a. Verify that DAA_session ->DAA_stage==19. Return TPM_DAA_STAGE and flush handle on mismatch */ /* NOTE Done by common code */ @@ -3158,7 +3158,7 @@ unsigned int numBytes; /* just for debug */ printf("TPM_DAAJoin_Stage20:\n"); - tpm_state = tpm_state; /* not used */ + (void)tpm_state; /* not used */ /* a. Verify that DAA_session ->DAA_stage==20. Return TPM_DAA_STAGE and flush handle on mismatch */ /* NOTE Done by common code */ @@ -3256,7 +3256,7 @@ unsigned int numBytes; /* just for debug */ printf("TPM_DAAJoin_Stage21:\n"); - tpm_state = tpm_state; /* not used */ + (void)tpm_state; /* not used */ /* a. Verify that DAA_session ->DAA_stage==21. Return TPM_DAA_STAGE and flush handle on mismatch */ /* NOTE Done by common code */ @@ -3706,7 +3706,7 @@ uint32_t stream_size; printf("TPM_DAASign_Stage01:\n"); - outputData = outputData; /* not used */ + (void)outputData; /* not used */ TPM_DAASensitive_Init(&tpm_daa_sensitive); /* freed @1 */ /* a. Verify that DAA_session ->DAA_stage==1. Return TPM_DAA_STAGE and flush handle on mismatch */ @@ -3762,7 +3762,7 @@ TPM_BIGNUM zBignum = NULL; /* freed @5 */ printf("TPM_DAASign_Stage05:\n"); - tpm_state = tpm_state; /* not used */ + (void)tpm_state; /* not used */ /* a. Verify that DAA_session ->DAA_stage==5. Return TPM_DAA_STAGE and flush handle on mismatch */ /* NOTE Done by common code */ @@ -3869,7 +3869,7 @@ TPM_RESULT rc = 0; unsigned char *stream; uint32_t stream_size; - uint8_t selector; + uint8_t selector = -1; TPM_BOOL parentPCRStatus; TPM_KEY_HANDLE keyHandle; TPM_KEY *identityKey = NULL; /* the key specified by keyHandle */ @@ -4110,7 +4110,7 @@ TPM_DAA_SENSITIVE tpm_daa_sensitive; printf("TPM_DAASign_Stage14:\n"); - outputData = outputData; /* not used */ + (void)outputData; /* not used */ TPM_DAASensitive_Init(&tpm_daa_sensitive); /* freed @7 */ /* a. Verify that DAA_session ->DAA_stage==14. Return TPM_DAA_STAGE and flush handle on mismatch */ @@ . patch -p0 <<'@@ .' Index: libtpm/tpm/tpm_init.c ============================================================================ $ cvs diff -u -r1.1.1.2 -r1.2 tpm_init.c --- libtpm/tpm/tpm_init.c 27 Aug 2013 20:20:53 -0000 1.1.1.2 +++ libtpm/tpm/tpm_init.c 5 Sep 2014 19:45:53 -0000 1.2 @@ -541,7 +541,7 @@ TPM_RESULT rc = 0; printf(" TPM_StanyData_Load:\n"); - tpm_stany_data = tpm_stany_data; + (void)tpm_stany_data; /* check tag */ if (rc == 0) { rc = TPM_CheckTag(TPM_TAG_STANY_DATA, stream, stream_size); @@ -565,7 +565,7 @@ TPM_RESULT rc = 0; printf(" TPM_StanyData_Store:\n"); - tpm_stany_data = tpm_stany_data; + (void)tpm_stany_data; /* store tag */ if (rc == 0) { rc = TPM_Sbuffer_Append16(sbuffer, TPM_TAG_STANY_DATA); @@ -590,7 +590,7 @@ { printf(" TPM_StanyData_Delete:\n"); /* nothing to free */ - tpm_stany_data = tpm_stany_data; + (void)tpm_stany_data; return; } @@ -1090,9 +1090,9 @@ TPM_RESULT returnCode = TPM_SUCCESS; /* command return code */ printf("TPM_Process_Init: Ordinal Entry\n"); - ordinal = ordinal; /* not used */ - command = command; /* not used */ - transportInternal = transportInternal; /* not used */ + (void)ordinal; /* not used */ + (void)command; /* not used */ + (void)transportInternal; /* not used */ /* check state */ /* NOTE: Allow at any time. */ /* @@ -1116,7 +1116,7 @@ #ifdef TPM_TEST returnCode = TPM_InitCmd(tpm_state); #else - tpm_state = tpm_state; /* to quiet the compiler */ + (void) tpm_state; /* to quiet the compiler */ printf("TPM_Process_Init: Error, bad ordinal\n"); returnCode = TPM_BAD_ORDINAL; #endif @@ . patch -p0 <<'@@ .' Index: libtpm/tpm/tpm_io.c ============================================================================ $ cvs diff -u -r1.1.1.2 -r1.2 tpm_io.c --- libtpm/tpm/tpm_io.c 27 Aug 2013 20:20:52 -0000 1.1.1.2 +++ libtpm/tpm/tpm_io.c 5 Sep 2014 19:45:53 -0000 1.2 @@ -152,7 +152,7 @@ } /* read the command through the paramSize from the socket stream */ if (rc == 0) { - mainLoopArgs = mainLoopArgs; /* not used */ + (void) mainLoopArgs; /* not used */ rc = TPM_IO_ReadBytes(connection_fd, buffer, headerSize); } if (rc == 0) { @@ -359,7 +359,7 @@ fd_set readfds; int n; - mainLoopArgs = mainLoopArgs; /* not used */ + (void)mainLoopArgs; /* not used */ while (rc == 0) { FD_ZERO(&readfds); @@ . patch -p0 <<'@@ .' Index: libtpm/tpm/tpm_pcr.c ============================================================================ $ cvs diff -u -r1.2 -r1.3 tpm_pcr.c --- libtpm/tpm/tpm_pcr.c 17 Oct 2013 18:34:23 -0000 1.2 +++ libtpm/tpm/tpm_pcr.c 5 Sep 2014 19:45:54 -0000 1.3 @@ -213,7 +213,7 @@ printf(" TPM_PCR_Init: pcrIndex %lu\n", (unsigned long)pcrIndex); #if defined TPM_PCCLIENT /* These values are from the PC Client specification */ - tpm_pcr_attributes = tpm_pcr_attributes; + (void) tpm_pcr_attributes; if ((pcrIndex >= 17) && (pcrIndex <= 22)) { TPM_Digest_Set(tpm_pcrs[pcrIndex]); /* 17-22 init to ff */ } else { @@ -3366,7 +3366,7 @@ } } if (rc == 0) { - ordinal = ordinal; + (void)ordinal; } return rc; } @@ . patch -p0 <<'@@ .' Index: libtpm/tpm/tpm_permanent.c ============================================================================ $ cvs diff -u -r1.1.1.2 -r1.2 tpm_permanent.c --- libtpm/tpm/tpm_permanent.c 27 Aug 2013 20:20:53 -0000 1.1.1.2 +++ libtpm/tpm/tpm_permanent.c 5 Sep 2014 19:45:54 -0000 1.2 @@ -729,7 +729,7 @@ printf(" TPM_PermanentData_Load: Loading DAA Blob key\n"); rc = TPM_SymmetricKeyData_Load(tpm_permanent_data->daaBlobKey, stream, stream_size); } - instanceData = instanceData; /* to quiet the compiler */ + (void)instanceData; /* to quiet the compiler */ return rc; } @@ -864,7 +864,7 @@ if (rc == 0) { rc = TPM_SymmetricKeyData_Store(sbuffer, tpm_permanent_data->daaBlobKey); } - instanceData = instanceData; /* to quiet the compiler */ + (void)instanceData; /* to quiet the compiler */ return rc; } @@ -909,7 +909,7 @@ TPM_BOOL instanceData) { printf(" TPM_PermanentData_Zero:\n"); - instanceData = instanceData; + (void)instanceData; if (tpm_permanent_data != NULL) { TPM_Secret_Init(tpm_permanent_data->tpmProof); TPM_Nonce_Init(tpm_permanent_data->EKReset); @@ . patch -p0 <<'@@ .' Index: libtpm/tpm/tpm_platform.c ============================================================================ $ cvs diff -u -r1.1.1.1 -r1.2 tpm_platform.c --- libtpm/tpm/tpm_platform.c 27 Aug 2013 20:20:53 -0000 1.1.1.1 +++ libtpm/tpm/tpm_platform.c 5 Sep 2014 19:45:54 -0000 1.2 @@ -71,7 +71,7 @@ return rc; } #else - tpm_number = tpm_number; /* to silence the compiler */ + (void)tpm_number; /* to silence the compiler */ #endif if (rc == 0) { @@ -107,7 +107,7 @@ return rc; } #else - tpm_number = tpm_number; /* to silence the compiler */ + (void)tpm_number; /* to silence the compiler */ #endif *physicalPresence = FALSE; return rc; @@ -128,7 +128,7 @@ uint32_t tpm_number) { TPM_RESULT rc = 0; - tpm_number = tpm_number; /* to silence the compiler */ + (void)tpm_number; /* to silence the compiler */ #if defined TPM_PCCLIENT /* These values are from the PC Client specification */ printf(" TPM_IO_GPIO_Write: nvIndex %08x\n", nvIndex); @@ -155,7 +155,7 @@ uint32_t tpm_number) { TPM_RESULT rc = 0; - tpm_number = tpm_number; /* to silence the compiler */ + (void)tpm_number; /* to silence the compiler */ #if defined TPM_PCCLIENT /* These values are from the PC Client specification */ printf(" TPM_IO_GPIO_Read: nvIndex %08x\n", nvIndex); @@ . patch -p0 <<'@@ .' Index: libtpm/tpm/tpm_process.c ============================================================================ $ cvs diff -u -r1.1.1.2 -r1.2 tpm_process.c --- libtpm/tpm/tpm_process.c 27 Aug 2013 20:20:52 -0000 1.1.1.2 +++ libtpm/tpm/tpm_process.c 5 Sep 2014 19:45:54 -0000 1.2 @@ -2888,11 +2888,11 @@ TPM_RESULT rcf = 0; printf("TPM_Process_Unused:\n"); - tpm_state = tpm_state; /* not used */ - paramSize = paramSize; /* not used */ - ordinal = ordinal; /* not used */ - command = command; /* not used */ - transportInternal = transportInternal; /* not used */ + (void) tpm_state; /* not used */ + (void) paramSize; /* not used */ + (void) ordinal; /* not used */ + (void) command; /* not used */ + (void) transportInternal; /* not used */ printf("TPM_Process_Unused: Ordinal returnCode %08x %u\n", TPM_BAD_ORDINAL, TPM_BAD_ORDINAL); rcf = TPM_Sbuffer_StoreInitialResponse(response, tag, TPM_BAD_ORDINAL); @@ -4142,7 +4142,7 @@ { TPM_RESULT rc = 0; - symMode = symMode; /* not currently used */ + (void)symMode; /* not currently used */ printf(" TPM_GetCapability_CapSymMode: Return %02x\n", FALSE); rc = TPM_Sbuffer_Append8(capabilityResponse, FALSE); return rc; @@ -4221,8 +4221,8 @@ break; #endif default: - capabilityResponse = capabilityResponse; /* not used */ - tpm_state = tpm_state; /* not used */ + (void) capabilityResponse; /* not used */ + (void) tpm_state; /* not used */ printf("TPM_GetCapability_CapMfr: Error, unsupported subCap %08x\n", subCap32); rc = TPM_BAD_MODE; break; @@ -4465,7 +4465,7 @@ printf(" TPM_GetCapability_CapDaLogic:\n"); TPM_DaInfoLimited_Init(&tpm_da_info_limited); /* freed @1 */ TPM_DaInfo_Init(&tpm_da_info); /* freed @2 */ - subCap = subCap; /* dictionary attack mitigation not per entity type in this + (void)subCap; /* dictionary attack mitigation not per entity type in this implementation. */ /* if disableFullDALogicInfo is TRUE, the full dictionary attack TPM_GetCapability info is deactivated. The returned structure is TPM_DA_INFO_LIMITED. */ @@ -5350,8 +5350,8 @@ uint32_t valueUint32 = 0; /* start with illegal value */ printf(" TPM_SetCapabilityCommon:\n"); - subCap16 = subCap16; /* not used */ - subCap = subCap; /* not used */ + (void) subCap16; /* not used */ + (void) subCap; /* not used */ if (rc == 0) { if ((capArea == TPM_SET_PERM_FLAGS) || (capArea == TPM_SET_STCLEAR_FLAGS) || @@ -5732,7 +5732,7 @@ TPM_BOOL writeAllNV = FALSE; /* TRUE if the structure has been changed */ printf(" TPM_SetCapability_CapPermData:\n"); - presenceAuthorized = presenceAuthorized; /* not used */ + (void) presenceAuthorized; /* not used */ if (rc == 0) { switch (subCap32) { case TPM_PD_RESTRICTDELEGATE: @@ -5818,8 +5818,8 @@ TPM_RESULT rc = 0; printf(" TPM_SetCapability_CapStclearFlags: valueBool %02x\n", valueBool); - ownerAuthorized = ownerAuthorized; /* not used */ - presenceAuthorized = presenceAuthorized; /* not used */ + (void) ownerAuthorized; /* not used */ + (void) presenceAuthorized; /* not used */ if (rc == 0) { switch (subCap32) { case TPM_SF_DISABLEFORCECLEAR: @@ -5881,7 +5881,7 @@ #endif printf(" TPM_SetCapability_CapStclearData:\n"); - ownerAuthorized = ownerAuthorized; /* not used */ + (void) ownerAuthorized; /* not used */ if (rc == 0) { switch (subCap32) { #if (TPM_REVISION >= 103) /* added for rev 103 */ @@ -5939,8 +5939,8 @@ TPM_RESULT rc = 0; printf(" TPM_SetCapability_CapStanyFlags:\n"); - ownerAuthorized = ownerAuthorized; /* not used */ - presenceAuthorized = presenceAuthorized; /* not used */ + (void) ownerAuthorized; /* not used */ + (void) presenceAuthorized; /* not used */ if (rc == 0) { switch (subCap32) { case TPM_AF_TOSPRESENT: @@ -6000,10 +6000,10 @@ TPM_RESULT rc = 0; printf(" TPM_SetCapability_CapStanyData:\n"); - tpm_state = tpm_state; /* not used */ - ownerAuthorized = ownerAuthorized; /* not used */ - presenceAuthorized = presenceAuthorized; /* not used */ - setValue = setValue; /* not used */ + (void) tpm_state; /* not used */ + (void) ownerAuthorized; /* not used */ + (void) presenceAuthorized; /* not used */ + (void) setValue; /* not used */ if (rc == 0) { switch (subCap32) { case TPM_AD_CONTEXTNONCESESSION: @@ -6033,15 +6033,15 @@ TPM_RESULT rc = 0; printf(" TPM_SetCapability_CapVendor:\n"); - ownerAuthorized = ownerAuthorized; /* not used */ - presenceAuthorized = presenceAuthorized; /* not used */ - setValue = setValue; + (void) ownerAuthorized; /* not used */ + (void) presenceAuthorized; /* not used */ + (void) setValue; /* make temporary copies so the setValue is not touched */ if (rc == 0) { switch(subCap32) { default: printf("TPM_SetCapability_CapVendor: Error, unsupported subCap %08x\n", subCap32); - tpm_state = tpm_state; /* not used */ + (void) tpm_state; /* not used */ rc = TPM_BAD_PARAMETER; break; @@ . patch -p0 <<'@@ .' Index: libtpm/tpm/tpm_transport.c ============================================================================ $ cvs diff -u -r1.2 -r1.3 tpm_transport.c --- libtpm/tpm/tpm_transport.c 17 Oct 2013 18:34:23 -0000 1.2 +++ libtpm/tpm/tpm_transport.c 5 Sep 2014 19:45:54 -0000 1.3 @@ -1861,7 +1861,7 @@ TPM_SIZED_BUFFER wrappedRsp; /* The wrapped response */ printf("TPM_Process_ExecuteTransport: Ordinal Entry\n"); - transportInternal = transportInternal; /* TPM_ExecuteTransport cannot be wrapped */ + (void)transportInternal; /* TPM_ExecuteTransport cannot be wrapped */ TPM_SizedBuffer_Init(&wrappedCmd); /* freed @1 */ TPM_SizedBuffer_Init(&wrappedRsp); /* freed @2 */ g1Mgf1 = NULL; /* freed @3 */ @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org