代码拉取完成,页面将自动刷新
From 1260a66b8fe7400250d33f98fcbce0fa848bfc09 Mon Sep 17 00:00:00 2001
From: caodongxia <315816521@qq.com>
Date: Wed, 2 Jun 2021 19:18:22 +0800
Subject: [PATCH] create patch
---
tsk/base/tsk_base_i.h | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/tsk/base/tsk_base_i.h b/tsk/base/tsk_base_i.h
index ffa5cf3..c022302 100644
--- a/tsk/base/tsk_base_i.h
+++ b/tsk/base/tsk_base_i.h
@@ -85,8 +85,8 @@ extern "C" {
*/
#define tsk_getu16(endian, x) \
(uint16_t)(((endian) == TSK_LIT_ENDIAN) ? \
- (((uint8_t *)(x))[0] + (((uint8_t *)(x))[1] << 8)) : \
- (((uint8_t *)(x))[1] + (((uint8_t *)(x))[0] << 8)) )
+ (((uint8_t *)(x))[0] + ((unsigned int)(((uint8_t *)(x))[1]) << 8)) : \
+ (((uint8_t *)(x))[1] + ((unsigned int)(((uint8_t *)(x))[0]) << 8)) )
/** \internal
* Read a 16-bit signed value.
@@ -105,8 +105,8 @@ extern "C" {
*/
#define tsk_getu24(endian, x) \
(uint32_t)(((endian) == TSK_LIT_ENDIAN) ? \
- (((uint8_t *)(x))[0] + (((uint8_t *)(x))[1] << 8) + (((uint8_t *)(x))[2] << 16)) : \
- (((uint8_t *)(x))[2] + (((uint8_t *)(x))[1] << 8) + (((uint8_t *)(x))[0] << 16)) )
+ (((uint8_t *)(x))[0] + ((unsigned int)(((uint8_t *)(x))[1]) << 8) + ((unsigned int)(((uint8_t *)(x))[2]) << 16)) : \
+ (((uint8_t *)(x))[2] + ((unsigned int)(((uint8_t *)(x))[1]) << 8) + ((unsigned int)(((uint8_t *)(x))[0]) << 16)) )
@@ -118,15 +118,15 @@ extern "C" {
*/
#define tsk_getu32(endian, x) \
(uint32_t)( ((endian) == TSK_LIT_ENDIAN) ? \
- ((((uint8_t *)(x))[0] << 0) + \
- (((uint8_t *)(x))[1] << 8) + \
- (((uint8_t *)(x))[2] << 16) + \
- ((uint32_t)((uint8_t *)(x))[3] << 24) ) \
+ (((unsigned int)(((uint8_t *)(x))[0]) << 0) + \
+ ((unsigned int)(((uint8_t *)(x))[1]) << 8) + \
+ ((unsigned int)(((uint8_t *)(x))[2]) << 16) + \
+ ((unsigned int)(((uint8_t *)(x))[3]) << 24) ) \
: \
- ((((uint8_t *)(x))[3] << 0) + \
- (((uint8_t *)(x))[2] << 8) + \
- (((uint8_t *)(x))[1] << 16) + \
- ((uint32_t)((uint8_t *)(x))[0] << 24) ) )
+ (((unsigned int)(((uint8_t *)(x))[3]) << 0) + \
+ ((unsigned int)(((uint8_t *)(x))[2]) << 8) + \
+ ((unsigned int)(((uint8_t *)(x))[1]) << 16) + \
+ ((unsigned int)(((uint8_t *)(x))[0]) << 24) ) )
/** \internal
* Read a 32-bit signed value.
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。