Fixing compilation warning when compiling the code with -Wcast-qual.
authorvlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Wed, 26 Nov 2008 19:03:41 +0000 (19:03 +0000)
committervlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Wed, 26 Nov 2008 19:03:41 +0000 (19:03 +0000)
The casting from (const uint8_t *) to (uint8_t *) is not really necessary.

Signed-off-by: Dotan Barak <dotanba@gmail.com>
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@585 d57e44dd-8a1f-0410-8b47-8ef2f437770f

scst/include/scst_const.h

index 87ce9f2..2c84479 100644 (file)
@@ -115,10 +115,10 @@ enum scst_cmd_queue_type {
 #define SCST_LOAD_SENSE(key_asc_ascq) key_asc_ascq
 
 #define SCST_SENSE_VALID(sense)  ((sense != NULL) && \
-                                 ((((uint8_t *)(sense))[0] & 0x70) == 0x70))
+                                 ((((const uint8_t *)(sense))[0] & 0x70) == 0x70))
 
 #define SCST_NO_SENSE(sense)     ((sense != NULL) && \
-                                 (((uint8_t *)(sense))[2] == 0))
+                                 (((const uint8_t *)(sense))[2] == 0))
 
 static inline int scst_is_ua_sense(const uint8_t *sense)
 {