Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
authoralagoutte <alagoutte@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 17 Dec 2011 10:05:47 +0000 (10:05 +0000)
committeralagoutte <alagoutte@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 17 Dec 2011 10:05:47 +0000 (10:05 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@40234 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-zbee-security.c
epan/dissectors/packet-zbee-zcl.c

index 8e757695ed7e2d11195f6c0cebe14a39f9653d2d..d754c1f4deb4f1b1bc51306ba8486263d1d7bd86 100644 (file)
@@ -825,7 +825,7 @@ zbee_sec_make_nonce(zbee_security_packet *packet, guint8 *nonce)
     *(nonce++) = (guint8)((packet->counter)>>16 & 0xff);
     *(nonce++) = (guint8)((packet->counter)>>24 & 0xff);
     /* Next byte is the security control field. */
-    *(nonce++) = packet->control;
+    *(nonce) = packet->control;
 } /* zbee_sec_make_nonce */
 #endif
 
@@ -1145,7 +1145,7 @@ zbee_sec_hash(guint8 *input, guint input_len, guint8 *output)
     } /* while */
     /* Add the 'n'-bit representation of 'l' to the end of the block. */
     cipher_in[j++] = ((input_len * 8) >> 8) & 0xff;
-    cipher_in[j++] = ((input_len * 8) >> 0) & 0xff;
+    cipher_in[j] = ((input_len * 8) >> 0) & 0xff;
     /* Process the last cipher block. */
     (void)gcry_cipher_setkey(cipher_hd, output, ZBEE_SEC_CONST_BLOCKSIZE);
     (void)gcry_cipher_encrypt(cipher_hd, output, ZBEE_SEC_CONST_BLOCKSIZE, cipher_in, ZBEE_SEC_CONST_BLOCKSIZE);
index e710428503e915b5d94e25f6ffd9c2ce105045ec..da9e78a248c80a26b058dbfbe72cb60383f93360 100644 (file)
@@ -1380,9 +1380,6 @@ static void dissect_zcl_attr_data(tvbuff_t *tvb, proto_tree *tree, guint *offset
     gdouble attr_double;
     nstime_t attr_time;
 
-    attr_uint = 0;
-    attr_int = 0;
-
     /* Dissect attribute data type and data */
     switch ( data_type ) {
         case ZBEE_ZCL_NO_DATA: