summaryrefslogtreecommitdiff
path: root/lib9p/core_generated.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib9p/core_generated.c')
-rw-r--r--lib9p/core_generated.c618
1 files changed, 309 insertions, 309 deletions
diff --git a/lib9p/core_generated.c b/lib9p/core_generated.c
index c8896b9..ffef2c4 100644
--- a/lib9p/core_generated.c
+++ b/lib9p/core_generated.c
@@ -3011,7 +3011,7 @@ static void unmarshal_Rswrite([[maybe_unused]] struct lib9p_ctx *ctx, uint8_t *n
#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u
static bool marshal_stat(struct lib9p_ctx *ctx, struct lib9p_stat *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 49 + val->name.len + val->owner_uname.len + val->owner_gname.len + val->last_modifier_uname.len;
+ uint32_t needed_size = (uint32_t)(49 + val->name.len + val->owner_uname.len + val->owner_gname.len + val->last_modifier_uname.len);
#if CONFIG_9P_ENABLE_9P2000_u
if is_ver(ctx, 9P2000_u) {
needed_size += 14 + val->extension.len;
@@ -3021,8 +3021,8 @@ static bool marshal_stat(struct lib9p_ctx *ctx, struct lib9p_stat *val, struct _
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_fstype = 2;
- MARSHAL_U16LE(ctx, offsetof_end - offsetof_fstype);
+ uint32_t offsetof_fstype = (uint32_t)(2);
+ MARSHAL_U16LE(ctx, (uint16_t)(offsetof_end - offsetof_fstype));
MARSHAL_U16LE(ctx, val->fstype);
MARSHAL_U32LE(ctx, val->fsdev);
MARSHAL_U8LE(ctx, val->qid.type & qt_masks[ctx->version]);
@@ -3055,7 +3055,7 @@ static bool marshal_stat(struct lib9p_ctx *ctx, struct lib9p_stat *val, struct _
#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u */
#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u || CONFIG_9P_ENABLE_uninitialized
static bool marshal_Tversion(struct lib9p_ctx *ctx, struct lib9p_msg_Tversion *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 13 + val->version.len;
+ uint32_t needed_size = (uint32_t)(13 + val->version.len);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Tversion",
@@ -3064,9 +3064,9 @@ static bool marshal_Tversion(struct lib9p_ctx *ctx, struct lib9p_msg_Tversion *v
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 100);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(100));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->max_msg_size);
MARSHAL_U16LE(ctx, val->version.len);
@@ -3075,7 +3075,7 @@ static bool marshal_Tversion(struct lib9p_ctx *ctx, struct lib9p_msg_Tversion *v
}
static bool marshal_Rversion(struct lib9p_ctx *ctx, struct lib9p_msg_Rversion *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 13 + val->version.len;
+ uint32_t needed_size = (uint32_t)(13 + val->version.len);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rversion",
@@ -3084,9 +3084,9 @@ static bool marshal_Rversion(struct lib9p_ctx *ctx, struct lib9p_msg_Rversion *v
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 101);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(101));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->max_msg_size);
MARSHAL_U16LE(ctx, val->version.len);
@@ -3097,7 +3097,7 @@ static bool marshal_Rversion(struct lib9p_ctx *ctx, struct lib9p_msg_Rversion *v
#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u || CONFIG_9P_ENABLE_uninitialized */
#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u
static bool marshal_Tauth(struct lib9p_ctx *ctx, struct lib9p_msg_Tauth *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 15 + val->uname.len + val->aname.len;
+ uint32_t needed_size = (uint32_t)(15 + val->uname.len + val->aname.len);
#if CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_u
if ( is_ver(ctx, 9P2000_L) || is_ver(ctx, 9P2000_u) ) {
needed_size += 4;
@@ -3111,9 +3111,9 @@ static bool marshal_Tauth(struct lib9p_ctx *ctx, struct lib9p_msg_Tauth *val, st
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 102);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(102));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->afid);
MARSHAL_U16LE(ctx, val->uname.len);
@@ -3129,7 +3129,7 @@ static bool marshal_Tauth(struct lib9p_ctx *ctx, struct lib9p_msg_Tauth *val, st
}
static bool marshal_Rauth(struct lib9p_ctx *ctx, struct lib9p_msg_Rauth *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 20;
+ uint32_t needed_size = (uint32_t)(20);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rauth",
@@ -3138,9 +3138,9 @@ static bool marshal_Rauth(struct lib9p_ctx *ctx, struct lib9p_msg_Rauth *val, st
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 103);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(103));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U8LE(ctx, val->aqid.type & qt_masks[ctx->version]);
MARSHAL_U32LE(ctx, val->aqid.vers);
@@ -3149,7 +3149,7 @@ static bool marshal_Rauth(struct lib9p_ctx *ctx, struct lib9p_msg_Rauth *val, st
}
static bool marshal_Tattach(struct lib9p_ctx *ctx, struct lib9p_msg_Tattach *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 19 + val->uname.len + val->aname.len;
+ uint32_t needed_size = (uint32_t)(19 + val->uname.len + val->aname.len);
#if CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_u
if ( is_ver(ctx, 9P2000_L) || is_ver(ctx, 9P2000_u) ) {
needed_size += 4;
@@ -3163,9 +3163,9 @@ static bool marshal_Tattach(struct lib9p_ctx *ctx, struct lib9p_msg_Tattach *val
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 104);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(104));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
MARSHAL_U32LE(ctx, val->afid);
@@ -3182,7 +3182,7 @@ static bool marshal_Tattach(struct lib9p_ctx *ctx, struct lib9p_msg_Tattach *val
}
static bool marshal_Rattach(struct lib9p_ctx *ctx, struct lib9p_msg_Rattach *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 20;
+ uint32_t needed_size = (uint32_t)(20);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rattach",
@@ -3191,9 +3191,9 @@ static bool marshal_Rattach(struct lib9p_ctx *ctx, struct lib9p_msg_Rattach *val
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 105);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(105));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U8LE(ctx, val->qid.type & qt_masks[ctx->version]);
MARSHAL_U32LE(ctx, val->qid.vers);
@@ -3204,7 +3204,7 @@ static bool marshal_Rattach(struct lib9p_ctx *ctx, struct lib9p_msg_Rattach *val
#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u */
#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u || CONFIG_9P_ENABLE_uninitialized
static bool marshal_Rerror(struct lib9p_ctx *ctx, struct lib9p_msg_Rerror *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 9 + val->errstr.len;
+ uint32_t needed_size = (uint32_t)(9 + val->errstr.len);
#if CONFIG_9P_ENABLE_9P2000_u
if is_ver(ctx, 9P2000_u) {
needed_size += 4;
@@ -3218,9 +3218,9 @@ static bool marshal_Rerror(struct lib9p_ctx *ctx, struct lib9p_msg_Rerror *val,
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 107);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(107));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U16LE(ctx, val->errstr.len);
MARSHAL_BYTES_ZEROCOPY(ctx, val->errstr.utf8, val->errstr.len);
@@ -3235,7 +3235,7 @@ static bool marshal_Rerror(struct lib9p_ctx *ctx, struct lib9p_msg_Rerror *val,
#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u || CONFIG_9P_ENABLE_uninitialized */
#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u
static bool marshal_Tflush(struct lib9p_ctx *ctx, struct lib9p_msg_Tflush *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 9;
+ uint32_t needed_size = (uint32_t)(9);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Tflush",
@@ -3244,16 +3244,16 @@ static bool marshal_Tflush(struct lib9p_ctx *ctx, struct lib9p_msg_Tflush *val,
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 108);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(108));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U16LE(ctx, val->oldtag);
return false;
}
static bool marshal_Rflush(struct lib9p_ctx *ctx, struct lib9p_msg_Rflush *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 7;
+ uint32_t needed_size = (uint32_t)(7);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rflush",
@@ -3262,15 +3262,15 @@ static bool marshal_Rflush(struct lib9p_ctx *ctx, struct lib9p_msg_Rflush *val,
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 109);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(109));
MARSHAL_U16LE(ctx, val->tag);
return false;
}
static bool marshal_Twalk(struct lib9p_ctx *ctx, struct lib9p_msg_Twalk *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 17;
+ uint32_t needed_size = (uint32_t)(17);
for (uint16_t i = 0; i < val->nwname; i++) {
needed_size += 2 + val->wname[i].len;
}
@@ -3282,9 +3282,9 @@ static bool marshal_Twalk(struct lib9p_ctx *ctx, struct lib9p_msg_Twalk *val, st
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 110);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(110));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
MARSHAL_U32LE(ctx, val->newfid);
@@ -3297,7 +3297,7 @@ static bool marshal_Twalk(struct lib9p_ctx *ctx, struct lib9p_msg_Twalk *val, st
}
static bool marshal_Rwalk(struct lib9p_ctx *ctx, struct lib9p_msg_Rwalk *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 9 + (val->nwqid)*13;
+ uint32_t needed_size = (uint32_t)(9 + (val->nwqid)*13);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rwalk",
@@ -3306,9 +3306,9 @@ static bool marshal_Rwalk(struct lib9p_ctx *ctx, struct lib9p_msg_Rwalk *val, st
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 111);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(111));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U16LE(ctx, val->nwqid);
for (uint16_t i = 0; i < val->nwqid; i++) {
@@ -3322,7 +3322,7 @@ static bool marshal_Rwalk(struct lib9p_ctx *ctx, struct lib9p_msg_Rwalk *val, st
#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u */
#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u
static bool marshal_Topen(struct lib9p_ctx *ctx, struct lib9p_msg_Topen *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 12;
+ uint32_t needed_size = (uint32_t)(12);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Topen",
@@ -3331,9 +3331,9 @@ static bool marshal_Topen(struct lib9p_ctx *ctx, struct lib9p_msg_Topen *val, st
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 112);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(112));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
MARSHAL_U8LE(ctx, val->mode & o_masks[ctx->version]);
@@ -3341,7 +3341,7 @@ static bool marshal_Topen(struct lib9p_ctx *ctx, struct lib9p_msg_Topen *val, st
}
static bool marshal_Ropen(struct lib9p_ctx *ctx, struct lib9p_msg_Ropen *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 24;
+ uint32_t needed_size = (uint32_t)(24);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Ropen",
@@ -3350,9 +3350,9 @@ static bool marshal_Ropen(struct lib9p_ctx *ctx, struct lib9p_msg_Ropen *val, st
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 113);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(113));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U8LE(ctx, val->qid.type & qt_masks[ctx->version]);
MARSHAL_U32LE(ctx, val->qid.vers);
@@ -3362,7 +3362,7 @@ static bool marshal_Ropen(struct lib9p_ctx *ctx, struct lib9p_msg_Ropen *val, st
}
static bool marshal_Tcreate(struct lib9p_ctx *ctx, struct lib9p_msg_Tcreate *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 18 + val->name.len;
+ uint32_t needed_size = (uint32_t)(18 + val->name.len);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Tcreate",
@@ -3371,9 +3371,9 @@ static bool marshal_Tcreate(struct lib9p_ctx *ctx, struct lib9p_msg_Tcreate *val
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 114);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(114));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
MARSHAL_U16LE(ctx, val->name.len);
@@ -3384,7 +3384,7 @@ static bool marshal_Tcreate(struct lib9p_ctx *ctx, struct lib9p_msg_Tcreate *val
}
static bool marshal_Rcreate(struct lib9p_ctx *ctx, struct lib9p_msg_Rcreate *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 24;
+ uint32_t needed_size = (uint32_t)(24);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rcreate",
@@ -3393,9 +3393,9 @@ static bool marshal_Rcreate(struct lib9p_ctx *ctx, struct lib9p_msg_Rcreate *val
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 115);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(115));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U8LE(ctx, val->qid.type & qt_masks[ctx->version]);
MARSHAL_U32LE(ctx, val->qid.vers);
@@ -3407,7 +3407,7 @@ static bool marshal_Rcreate(struct lib9p_ctx *ctx, struct lib9p_msg_Rcreate *val
#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u */
#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u
static bool marshal_Tread(struct lib9p_ctx *ctx, struct lib9p_msg_Tread *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 23;
+ uint32_t needed_size = (uint32_t)(23);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Tread",
@@ -3416,9 +3416,9 @@ static bool marshal_Tread(struct lib9p_ctx *ctx, struct lib9p_msg_Tread *val, st
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 116);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(116));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
MARSHAL_U64LE(ctx, val->offset);
@@ -3427,7 +3427,7 @@ static bool marshal_Tread(struct lib9p_ctx *ctx, struct lib9p_msg_Tread *val, st
}
static bool marshal_Rread(struct lib9p_ctx *ctx, struct lib9p_msg_Rread *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 11 + val->count;
+ uint32_t needed_size = (uint32_t)(11 + val->count);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rread",
@@ -3436,9 +3436,9 @@ static bool marshal_Rread(struct lib9p_ctx *ctx, struct lib9p_msg_Rread *val, st
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 117);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(117));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->count);
MARSHAL_BYTES_ZEROCOPY(ctx, val->data, val->count);
@@ -3446,7 +3446,7 @@ static bool marshal_Rread(struct lib9p_ctx *ctx, struct lib9p_msg_Rread *val, st
}
static bool marshal_Twrite(struct lib9p_ctx *ctx, struct lib9p_msg_Twrite *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 23 + val->count;
+ uint32_t needed_size = (uint32_t)(23 + val->count);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Twrite",
@@ -3455,9 +3455,9 @@ static bool marshal_Twrite(struct lib9p_ctx *ctx, struct lib9p_msg_Twrite *val,
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 118);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(118));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
MARSHAL_U64LE(ctx, val->offset);
@@ -3467,7 +3467,7 @@ static bool marshal_Twrite(struct lib9p_ctx *ctx, struct lib9p_msg_Twrite *val,
}
static bool marshal_Rwrite(struct lib9p_ctx *ctx, struct lib9p_msg_Rwrite *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 11;
+ uint32_t needed_size = (uint32_t)(11);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rwrite",
@@ -3476,16 +3476,16 @@ static bool marshal_Rwrite(struct lib9p_ctx *ctx, struct lib9p_msg_Rwrite *val,
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 119);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(119));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->count);
return false;
}
static bool marshal_Tclunk(struct lib9p_ctx *ctx, struct lib9p_msg_Tclunk *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 11;
+ uint32_t needed_size = (uint32_t)(11);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Tclunk",
@@ -3494,16 +3494,16 @@ static bool marshal_Tclunk(struct lib9p_ctx *ctx, struct lib9p_msg_Tclunk *val,
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 120);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(120));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
return false;
}
static bool marshal_Rclunk(struct lib9p_ctx *ctx, struct lib9p_msg_Rclunk *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 7;
+ uint32_t needed_size = (uint32_t)(7);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rclunk",
@@ -3512,15 +3512,15 @@ static bool marshal_Rclunk(struct lib9p_ctx *ctx, struct lib9p_msg_Rclunk *val,
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 121);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(121));
MARSHAL_U16LE(ctx, val->tag);
return false;
}
static bool marshal_Tremove(struct lib9p_ctx *ctx, struct lib9p_msg_Tremove *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 11;
+ uint32_t needed_size = (uint32_t)(11);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Tremove",
@@ -3529,16 +3529,16 @@ static bool marshal_Tremove(struct lib9p_ctx *ctx, struct lib9p_msg_Tremove *val
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 122);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(122));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
return false;
}
static bool marshal_Rremove(struct lib9p_ctx *ctx, struct lib9p_msg_Rremove *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 7;
+ uint32_t needed_size = (uint32_t)(7);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rremove",
@@ -3547,9 +3547,9 @@ static bool marshal_Rremove(struct lib9p_ctx *ctx, struct lib9p_msg_Rremove *val
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 123);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(123));
MARSHAL_U16LE(ctx, val->tag);
return false;
}
@@ -3557,7 +3557,7 @@ static bool marshal_Rremove(struct lib9p_ctx *ctx, struct lib9p_msg_Rremove *val
#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u */
#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u
static bool marshal_Tstat(struct lib9p_ctx *ctx, struct lib9p_msg_Tstat *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 11;
+ uint32_t needed_size = (uint32_t)(11);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Tstat",
@@ -3566,16 +3566,16 @@ static bool marshal_Tstat(struct lib9p_ctx *ctx, struct lib9p_msg_Tstat *val, st
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 124);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(124));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
return false;
}
static bool marshal_Rstat(struct lib9p_ctx *ctx, struct lib9p_msg_Rstat *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 58 + val->stat.name.len + val->stat.owner_uname.len + val->stat.owner_gname.len + val->stat.last_modifier_uname.len;
+ uint32_t needed_size = (uint32_t)(58 + val->stat.name.len + val->stat.owner_uname.len + val->stat.owner_gname.len + val->stat.last_modifier_uname.len);
#if CONFIG_9P_ENABLE_9P2000_u
if is_ver(ctx, 9P2000_u) {
needed_size += 14 + val->stat.extension.len;
@@ -3589,20 +3589,20 @@ static bool marshal_Rstat(struct lib9p_ctx *ctx, struct lib9p_msg_Rstat *val, st
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- uint32_t offsetof_stat = 9;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 125);
+ uint32_t offsetof_size = (uint32_t)(0);
+ uint32_t offsetof_stat = (uint32_t)(9);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(125));
MARSHAL_U16LE(ctx, val->tag);
- MARSHAL_U16LE(ctx, offsetof_end - offsetof_stat);
- uint32_t offsetof_stat_end = 49 + val->stat.name.len + val->stat.owner_uname.len + val->stat.owner_gname.len + val->stat.last_modifier_uname.len;
+ MARSHAL_U16LE(ctx, (uint16_t)(offsetof_end - offsetof_stat));
+ uint32_t offsetof_stat_end = (uint32_t)(49 + val->stat.name.len + val->stat.owner_uname.len + val->stat.owner_gname.len + val->stat.last_modifier_uname.len);
#if CONFIG_9P_ENABLE_9P2000_u
if is_ver(ctx, 9P2000_u) {
offsetof_stat_end += 14 + val->stat.extension.len;
}
#endif /* CONFIG_9P_ENABLE_9P2000_u */
- uint32_t offsetof_stat_fstype = 2;
- MARSHAL_U16LE(ctx, offsetof_stat_end - offsetof_stat_fstype);
+ uint32_t offsetof_stat_fstype = (uint32_t)(2);
+ MARSHAL_U16LE(ctx, (uint16_t)(offsetof_stat_end - offsetof_stat_fstype));
MARSHAL_U16LE(ctx, val->stat.fstype);
MARSHAL_U32LE(ctx, val->stat.fsdev);
MARSHAL_U8LE(ctx, val->stat.qid.type & qt_masks[ctx->version]);
@@ -3633,7 +3633,7 @@ static bool marshal_Rstat(struct lib9p_ctx *ctx, struct lib9p_msg_Rstat *val, st
}
static bool marshal_Twstat(struct lib9p_ctx *ctx, struct lib9p_msg_Twstat *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 62 + val->stat.name.len + val->stat.owner_uname.len + val->stat.owner_gname.len + val->stat.last_modifier_uname.len;
+ uint32_t needed_size = (uint32_t)(62 + val->stat.name.len + val->stat.owner_uname.len + val->stat.owner_gname.len + val->stat.last_modifier_uname.len);
#if CONFIG_9P_ENABLE_9P2000_u
if is_ver(ctx, 9P2000_u) {
needed_size += 14 + val->stat.extension.len;
@@ -3647,21 +3647,21 @@ static bool marshal_Twstat(struct lib9p_ctx *ctx, struct lib9p_msg_Twstat *val,
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- uint32_t offsetof_stat = 13;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 126);
+ uint32_t offsetof_size = (uint32_t)(0);
+ uint32_t offsetof_stat = (uint32_t)(13);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(126));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
- MARSHAL_U16LE(ctx, offsetof_end - offsetof_stat);
- uint32_t offsetof_stat_end = 49 + val->stat.name.len + val->stat.owner_uname.len + val->stat.owner_gname.len + val->stat.last_modifier_uname.len;
+ MARSHAL_U16LE(ctx, (uint16_t)(offsetof_end - offsetof_stat));
+ uint32_t offsetof_stat_end = (uint32_t)(49 + val->stat.name.len + val->stat.owner_uname.len + val->stat.owner_gname.len + val->stat.last_modifier_uname.len);
#if CONFIG_9P_ENABLE_9P2000_u
if is_ver(ctx, 9P2000_u) {
offsetof_stat_end += 14 + val->stat.extension.len;
}
#endif /* CONFIG_9P_ENABLE_9P2000_u */
- uint32_t offsetof_stat_fstype = 2;
- MARSHAL_U16LE(ctx, offsetof_stat_end - offsetof_stat_fstype);
+ uint32_t offsetof_stat_fstype = (uint32_t)(2);
+ MARSHAL_U16LE(ctx, (uint16_t)(offsetof_stat_end - offsetof_stat_fstype));
MARSHAL_U16LE(ctx, val->stat.fstype);
MARSHAL_U32LE(ctx, val->stat.fsdev);
MARSHAL_U8LE(ctx, val->stat.qid.type & qt_masks[ctx->version]);
@@ -3692,7 +3692,7 @@ static bool marshal_Twstat(struct lib9p_ctx *ctx, struct lib9p_msg_Twstat *val,
}
static bool marshal_Rwstat(struct lib9p_ctx *ctx, struct lib9p_msg_Rwstat *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 7;
+ uint32_t needed_size = (uint32_t)(7);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rwstat",
@@ -3701,9 +3701,9 @@ static bool marshal_Rwstat(struct lib9p_ctx *ctx, struct lib9p_msg_Rwstat *val,
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 127);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(127));
MARSHAL_U16LE(ctx, val->tag);
return false;
}
@@ -3711,7 +3711,7 @@ static bool marshal_Rwstat(struct lib9p_ctx *ctx, struct lib9p_msg_Rwstat *val,
#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u */
#if CONFIG_9P_ENABLE_9P2000_p9p
static bool marshal_Topenfd(struct lib9p_ctx *ctx, struct lib9p_msg_Topenfd *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 12;
+ uint32_t needed_size = (uint32_t)(12);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Topenfd",
@@ -3720,9 +3720,9 @@ static bool marshal_Topenfd(struct lib9p_ctx *ctx, struct lib9p_msg_Topenfd *val
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 98);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(98));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
MARSHAL_U8LE(ctx, val->mode & o_masks[ctx->version]);
@@ -3730,7 +3730,7 @@ static bool marshal_Topenfd(struct lib9p_ctx *ctx, struct lib9p_msg_Topenfd *val
}
static bool marshal_Ropenfd(struct lib9p_ctx *ctx, struct lib9p_msg_Ropenfd *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 28;
+ uint32_t needed_size = (uint32_t)(28);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Ropenfd",
@@ -3739,9 +3739,9 @@ static bool marshal_Ropenfd(struct lib9p_ctx *ctx, struct lib9p_msg_Ropenfd *val
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 99);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(99));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U8LE(ctx, val->qid.type & qt_masks[ctx->version]);
MARSHAL_U32LE(ctx, val->qid.vers);
@@ -3754,7 +3754,7 @@ static bool marshal_Ropenfd(struct lib9p_ctx *ctx, struct lib9p_msg_Ropenfd *val
#endif /* CONFIG_9P_ENABLE_9P2000_p9p */
#if CONFIG_9P_ENABLE_9P2000_L
static bool marshal_Rlerror(struct lib9p_ctx *ctx, struct lib9p_msg_Rlerror *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 11;
+ uint32_t needed_size = (uint32_t)(11);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rlerror",
@@ -3763,16 +3763,16 @@ static bool marshal_Rlerror(struct lib9p_ctx *ctx, struct lib9p_msg_Rlerror *val
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 7);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(7));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->errnum);
return false;
}
static bool marshal_Tstatfs(struct lib9p_ctx *ctx, struct lib9p_msg_Tstatfs *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 11;
+ uint32_t needed_size = (uint32_t)(11);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Tstatfs",
@@ -3781,16 +3781,16 @@ static bool marshal_Tstatfs(struct lib9p_ctx *ctx, struct lib9p_msg_Tstatfs *val
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 8);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(8));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
return false;
}
static bool marshal_Rstatfs(struct lib9p_ctx *ctx, struct lib9p_msg_Rstatfs *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 67;
+ uint32_t needed_size = (uint32_t)(67);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rstatfs",
@@ -3799,9 +3799,9 @@ static bool marshal_Rstatfs(struct lib9p_ctx *ctx, struct lib9p_msg_Rstatfs *val
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 9);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(9));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->type);
MARSHAL_U32LE(ctx, val->bsize);
@@ -3816,7 +3816,7 @@ static bool marshal_Rstatfs(struct lib9p_ctx *ctx, struct lib9p_msg_Rstatfs *val
}
static bool marshal_Tlopen(struct lib9p_ctx *ctx, struct lib9p_msg_Tlopen *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 15;
+ uint32_t needed_size = (uint32_t)(15);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Tlopen",
@@ -3825,9 +3825,9 @@ static bool marshal_Tlopen(struct lib9p_ctx *ctx, struct lib9p_msg_Tlopen *val,
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 12);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(12));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
MARSHAL_U32LE(ctx, val->flags & lo_masks[ctx->version]);
@@ -3835,7 +3835,7 @@ static bool marshal_Tlopen(struct lib9p_ctx *ctx, struct lib9p_msg_Tlopen *val,
}
static bool marshal_Rlopen(struct lib9p_ctx *ctx, struct lib9p_msg_Rlopen *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 24;
+ uint32_t needed_size = (uint32_t)(24);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rlopen",
@@ -3844,9 +3844,9 @@ static bool marshal_Rlopen(struct lib9p_ctx *ctx, struct lib9p_msg_Rlopen *val,
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 13);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(13));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U8LE(ctx, val->qid.type & qt_masks[ctx->version]);
MARSHAL_U32LE(ctx, val->qid.vers);
@@ -3856,7 +3856,7 @@ static bool marshal_Rlopen(struct lib9p_ctx *ctx, struct lib9p_msg_Rlopen *val,
}
static bool marshal_Tlcreate(struct lib9p_ctx *ctx, struct lib9p_msg_Tlcreate *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 25 + val->name.len;
+ uint32_t needed_size = (uint32_t)(25 + val->name.len);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Tlcreate",
@@ -3865,9 +3865,9 @@ static bool marshal_Tlcreate(struct lib9p_ctx *ctx, struct lib9p_msg_Tlcreate *v
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 14);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(14));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
MARSHAL_U16LE(ctx, val->name.len);
@@ -3879,7 +3879,7 @@ static bool marshal_Tlcreate(struct lib9p_ctx *ctx, struct lib9p_msg_Tlcreate *v
}
static bool marshal_Rlcreate(struct lib9p_ctx *ctx, struct lib9p_msg_Rlcreate *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 24;
+ uint32_t needed_size = (uint32_t)(24);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rlcreate",
@@ -3888,9 +3888,9 @@ static bool marshal_Rlcreate(struct lib9p_ctx *ctx, struct lib9p_msg_Rlcreate *v
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 15);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(15));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U8LE(ctx, val->qid.type & qt_masks[ctx->version]);
MARSHAL_U32LE(ctx, val->qid.vers);
@@ -3900,7 +3900,7 @@ static bool marshal_Rlcreate(struct lib9p_ctx *ctx, struct lib9p_msg_Rlcreate *v
}
static bool marshal_Tsymlink(struct lib9p_ctx *ctx, struct lib9p_msg_Tsymlink *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 19 + val->name.len + val->symtgt.len;
+ uint32_t needed_size = (uint32_t)(19 + val->name.len + val->symtgt.len);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Tsymlink",
@@ -3909,9 +3909,9 @@ static bool marshal_Tsymlink(struct lib9p_ctx *ctx, struct lib9p_msg_Tsymlink *v
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 16);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(16));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
MARSHAL_U16LE(ctx, val->name.len);
@@ -3923,7 +3923,7 @@ static bool marshal_Tsymlink(struct lib9p_ctx *ctx, struct lib9p_msg_Tsymlink *v
}
static bool marshal_Rsymlink(struct lib9p_ctx *ctx, struct lib9p_msg_Rsymlink *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 20;
+ uint32_t needed_size = (uint32_t)(20);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rsymlink",
@@ -3932,9 +3932,9 @@ static bool marshal_Rsymlink(struct lib9p_ctx *ctx, struct lib9p_msg_Rsymlink *v
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 17);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(17));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U8LE(ctx, val->qid.type & qt_masks[ctx->version]);
MARSHAL_U32LE(ctx, val->qid.vers);
@@ -3943,7 +3943,7 @@ static bool marshal_Rsymlink(struct lib9p_ctx *ctx, struct lib9p_msg_Rsymlink *v
}
static bool marshal_Tmknod(struct lib9p_ctx *ctx, struct lib9p_msg_Tmknod *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 29 + val->name.len;
+ uint32_t needed_size = (uint32_t)(29 + val->name.len);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Tmknod",
@@ -3952,9 +3952,9 @@ static bool marshal_Tmknod(struct lib9p_ctx *ctx, struct lib9p_msg_Tmknod *val,
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 18);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(18));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->dfid);
MARSHAL_U16LE(ctx, val->name.len);
@@ -3967,7 +3967,7 @@ static bool marshal_Tmknod(struct lib9p_ctx *ctx, struct lib9p_msg_Tmknod *val,
}
static bool marshal_Rmknod(struct lib9p_ctx *ctx, struct lib9p_msg_Rmknod *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 20;
+ uint32_t needed_size = (uint32_t)(20);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rmknod",
@@ -3976,9 +3976,9 @@ static bool marshal_Rmknod(struct lib9p_ctx *ctx, struct lib9p_msg_Rmknod *val,
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 19);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(19));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U8LE(ctx, val->qid.type & qt_masks[ctx->version]);
MARSHAL_U32LE(ctx, val->qid.vers);
@@ -3987,7 +3987,7 @@ static bool marshal_Rmknod(struct lib9p_ctx *ctx, struct lib9p_msg_Rmknod *val,
}
static bool marshal_Trename(struct lib9p_ctx *ctx, struct lib9p_msg_Trename *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 17 + val->name.len;
+ uint32_t needed_size = (uint32_t)(17 + val->name.len);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Trename",
@@ -3996,9 +3996,9 @@ static bool marshal_Trename(struct lib9p_ctx *ctx, struct lib9p_msg_Trename *val
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 20);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(20));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
MARSHAL_U32LE(ctx, val->dfid);
@@ -4008,7 +4008,7 @@ static bool marshal_Trename(struct lib9p_ctx *ctx, struct lib9p_msg_Trename *val
}
static bool marshal_Rrename(struct lib9p_ctx *ctx, struct lib9p_msg_Rrename *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 7;
+ uint32_t needed_size = (uint32_t)(7);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rrename",
@@ -4017,15 +4017,15 @@ static bool marshal_Rrename(struct lib9p_ctx *ctx, struct lib9p_msg_Rrename *val
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 21);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(21));
MARSHAL_U16LE(ctx, val->tag);
return false;
}
static bool marshal_Treadlink(struct lib9p_ctx *ctx, struct lib9p_msg_Treadlink *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 11;
+ uint32_t needed_size = (uint32_t)(11);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Treadlink",
@@ -4034,16 +4034,16 @@ static bool marshal_Treadlink(struct lib9p_ctx *ctx, struct lib9p_msg_Treadlink
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 22);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(22));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
return false;
}
static bool marshal_Rreadlink(struct lib9p_ctx *ctx, struct lib9p_msg_Rreadlink *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 9 + val->target.len;
+ uint32_t needed_size = (uint32_t)(9 + val->target.len);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rreadlink",
@@ -4052,9 +4052,9 @@ static bool marshal_Rreadlink(struct lib9p_ctx *ctx, struct lib9p_msg_Rreadlink
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 23);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(23));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U16LE(ctx, val->target.len);
MARSHAL_BYTES_ZEROCOPY(ctx, val->target.utf8, val->target.len);
@@ -4062,7 +4062,7 @@ static bool marshal_Rreadlink(struct lib9p_ctx *ctx, struct lib9p_msg_Rreadlink
}
static bool marshal_Tgetattr(struct lib9p_ctx *ctx, struct lib9p_msg_Tgetattr *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 19;
+ uint32_t needed_size = (uint32_t)(19);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Tgetattr",
@@ -4071,9 +4071,9 @@ static bool marshal_Tgetattr(struct lib9p_ctx *ctx, struct lib9p_msg_Tgetattr *v
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 24);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(24));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
MARSHAL_U64LE(ctx, val->request_mask & getattr_masks[ctx->version]);
@@ -4081,7 +4081,7 @@ static bool marshal_Tgetattr(struct lib9p_ctx *ctx, struct lib9p_msg_Tgetattr *v
}
static bool marshal_Rgetattr(struct lib9p_ctx *ctx, struct lib9p_msg_Rgetattr *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 160;
+ uint32_t needed_size = (uint32_t)(160);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rgetattr",
@@ -4090,9 +4090,9 @@ static bool marshal_Rgetattr(struct lib9p_ctx *ctx, struct lib9p_msg_Rgetattr *v
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 25);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(25));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U64LE(ctx, val->valid & getattr_masks[ctx->version]);
MARSHAL_U8LE(ctx, val->qid.type & qt_masks[ctx->version]);
@@ -4120,7 +4120,7 @@ static bool marshal_Rgetattr(struct lib9p_ctx *ctx, struct lib9p_msg_Rgetattr *v
}
static bool marshal_Tsetattr(struct lib9p_ctx *ctx, struct lib9p_msg_Tsetattr *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 67;
+ uint32_t needed_size = (uint32_t)(67);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Tsetattr",
@@ -4129,9 +4129,9 @@ static bool marshal_Tsetattr(struct lib9p_ctx *ctx, struct lib9p_msg_Tsetattr *v
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 26);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(26));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
MARSHAL_U32LE(ctx, val->valid & setattr_masks[ctx->version]);
@@ -4147,7 +4147,7 @@ static bool marshal_Tsetattr(struct lib9p_ctx *ctx, struct lib9p_msg_Tsetattr *v
}
static bool marshal_Rsetattr(struct lib9p_ctx *ctx, struct lib9p_msg_Rsetattr *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 7;
+ uint32_t needed_size = (uint32_t)(7);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rsetattr",
@@ -4156,15 +4156,15 @@ static bool marshal_Rsetattr(struct lib9p_ctx *ctx, struct lib9p_msg_Rsetattr *v
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 27);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(27));
MARSHAL_U16LE(ctx, val->tag);
return false;
}
static bool marshal_Txattrwalk(struct lib9p_ctx *ctx, struct lib9p_msg_Txattrwalk *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 17 + val->name.len;
+ uint32_t needed_size = (uint32_t)(17 + val->name.len);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Txattrwalk",
@@ -4173,9 +4173,9 @@ static bool marshal_Txattrwalk(struct lib9p_ctx *ctx, struct lib9p_msg_Txattrwal
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 30);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(30));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
MARSHAL_U32LE(ctx, val->newfid);
@@ -4185,7 +4185,7 @@ static bool marshal_Txattrwalk(struct lib9p_ctx *ctx, struct lib9p_msg_Txattrwal
}
static bool marshal_Rxattrwalk(struct lib9p_ctx *ctx, struct lib9p_msg_Rxattrwalk *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 15;
+ uint32_t needed_size = (uint32_t)(15);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rxattrwalk",
@@ -4194,16 +4194,16 @@ static bool marshal_Rxattrwalk(struct lib9p_ctx *ctx, struct lib9p_msg_Rxattrwal
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 31);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(31));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U64LE(ctx, val->attr_size);
return false;
}
static bool marshal_Txattrcreate(struct lib9p_ctx *ctx, struct lib9p_msg_Txattrcreate *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 25 + val->name.len;
+ uint32_t needed_size = (uint32_t)(25 + val->name.len);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Txattrcreate",
@@ -4212,9 +4212,9 @@ static bool marshal_Txattrcreate(struct lib9p_ctx *ctx, struct lib9p_msg_Txattrc
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 32);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(32));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
MARSHAL_U16LE(ctx, val->name.len);
@@ -4225,7 +4225,7 @@ static bool marshal_Txattrcreate(struct lib9p_ctx *ctx, struct lib9p_msg_Txattrc
}
static bool marshal_Rxattrcreate(struct lib9p_ctx *ctx, struct lib9p_msg_Rxattrcreate *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 7;
+ uint32_t needed_size = (uint32_t)(7);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rxattrcreate",
@@ -4234,15 +4234,15 @@ static bool marshal_Rxattrcreate(struct lib9p_ctx *ctx, struct lib9p_msg_Rxattrc
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 33);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(33));
MARSHAL_U16LE(ctx, val->tag);
return false;
}
static bool marshal_Treaddir(struct lib9p_ctx *ctx, struct lib9p_msg_Treaddir *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 23;
+ uint32_t needed_size = (uint32_t)(23);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Treaddir",
@@ -4251,9 +4251,9 @@ static bool marshal_Treaddir(struct lib9p_ctx *ctx, struct lib9p_msg_Treaddir *v
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 40);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(40));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
MARSHAL_U64LE(ctx, val->offset);
@@ -4262,7 +4262,7 @@ static bool marshal_Treaddir(struct lib9p_ctx *ctx, struct lib9p_msg_Treaddir *v
}
static bool marshal_Rreaddir(struct lib9p_ctx *ctx, struct lib9p_msg_Rreaddir *val, struct _marshal_ret *ret) {
- uint64_t needed_size = 11 + val->count;
+ uint64_t needed_size = (uint64_t)(11 + val->count);
if (needed_size > (uint64_t)(ctx->max_msg_size)) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu64" > %"PRIu32")",
"Rreaddir",
@@ -4271,9 +4271,9 @@ static bool marshal_Rreaddir(struct lib9p_ctx *ctx, struct lib9p_msg_Rreaddir *v
return true;
}
uint32_t offsetof_end = (uint32_t)needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 41);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(41));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->count);
MARSHAL_BYTES_ZEROCOPY(ctx, val->data, val->count);
@@ -4281,7 +4281,7 @@ static bool marshal_Rreaddir(struct lib9p_ctx *ctx, struct lib9p_msg_Rreaddir *v
}
static bool marshal_Tfsync(struct lib9p_ctx *ctx, struct lib9p_msg_Tfsync *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 15;
+ uint32_t needed_size = (uint32_t)(15);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Tfsync",
@@ -4290,9 +4290,9 @@ static bool marshal_Tfsync(struct lib9p_ctx *ctx, struct lib9p_msg_Tfsync *val,
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 50);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(50));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
MARSHAL_U32LE(ctx, val->datasync);
@@ -4300,7 +4300,7 @@ static bool marshal_Tfsync(struct lib9p_ctx *ctx, struct lib9p_msg_Tfsync *val,
}
static bool marshal_Rfsync(struct lib9p_ctx *ctx, struct lib9p_msg_Rfsync *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 7;
+ uint32_t needed_size = (uint32_t)(7);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rfsync",
@@ -4309,15 +4309,15 @@ static bool marshal_Rfsync(struct lib9p_ctx *ctx, struct lib9p_msg_Rfsync *val,
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 51);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(51));
MARSHAL_U16LE(ctx, val->tag);
return false;
}
static bool marshal_Tlock(struct lib9p_ctx *ctx, struct lib9p_msg_Tlock *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 38 + val->client_id.len;
+ uint32_t needed_size = (uint32_t)(38 + val->client_id.len);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Tlock",
@@ -4326,9 +4326,9 @@ static bool marshal_Tlock(struct lib9p_ctx *ctx, struct lib9p_msg_Tlock *val, st
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 52);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(52));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
MARSHAL_U8LE(ctx, val->type);
@@ -4342,7 +4342,7 @@ static bool marshal_Tlock(struct lib9p_ctx *ctx, struct lib9p_msg_Tlock *val, st
}
static bool marshal_Rlock(struct lib9p_ctx *ctx, struct lib9p_msg_Rlock *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 8;
+ uint32_t needed_size = (uint32_t)(8);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rlock",
@@ -4351,16 +4351,16 @@ static bool marshal_Rlock(struct lib9p_ctx *ctx, struct lib9p_msg_Rlock *val, st
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 53);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(53));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U8LE(ctx, val->status);
return false;
}
static bool marshal_Tgetlock(struct lib9p_ctx *ctx, struct lib9p_msg_Tgetlock *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 34 + val->client_id.len;
+ uint32_t needed_size = (uint32_t)(34 + val->client_id.len);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Tgetlock",
@@ -4369,9 +4369,9 @@ static bool marshal_Tgetlock(struct lib9p_ctx *ctx, struct lib9p_msg_Tgetlock *v
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 54);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(54));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
MARSHAL_U8LE(ctx, val->type);
@@ -4384,7 +4384,7 @@ static bool marshal_Tgetlock(struct lib9p_ctx *ctx, struct lib9p_msg_Tgetlock *v
}
static bool marshal_Rgetlock(struct lib9p_ctx *ctx, struct lib9p_msg_Rgetlock *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 30 + val->client_id.len;
+ uint32_t needed_size = (uint32_t)(30 + val->client_id.len);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rgetlock",
@@ -4393,9 +4393,9 @@ static bool marshal_Rgetlock(struct lib9p_ctx *ctx, struct lib9p_msg_Rgetlock *v
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 55);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(55));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U8LE(ctx, val->type);
MARSHAL_U64LE(ctx, val->start);
@@ -4407,7 +4407,7 @@ static bool marshal_Rgetlock(struct lib9p_ctx *ctx, struct lib9p_msg_Rgetlock *v
}
static bool marshal_Tlink(struct lib9p_ctx *ctx, struct lib9p_msg_Tlink *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 17 + val->name.len;
+ uint32_t needed_size = (uint32_t)(17 + val->name.len);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Tlink",
@@ -4416,9 +4416,9 @@ static bool marshal_Tlink(struct lib9p_ctx *ctx, struct lib9p_msg_Tlink *val, st
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 70);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(70));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->dfid);
MARSHAL_U32LE(ctx, val->fid);
@@ -4428,7 +4428,7 @@ static bool marshal_Tlink(struct lib9p_ctx *ctx, struct lib9p_msg_Tlink *val, st
}
static bool marshal_Rlink(struct lib9p_ctx *ctx, struct lib9p_msg_Rlink *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 7;
+ uint32_t needed_size = (uint32_t)(7);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rlink",
@@ -4437,15 +4437,15 @@ static bool marshal_Rlink(struct lib9p_ctx *ctx, struct lib9p_msg_Rlink *val, st
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 71);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(71));
MARSHAL_U16LE(ctx, val->tag);
return false;
}
static bool marshal_Tmkdir(struct lib9p_ctx *ctx, struct lib9p_msg_Tmkdir *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 21 + val->name.len;
+ uint32_t needed_size = (uint32_t)(21 + val->name.len);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Tmkdir",
@@ -4454,9 +4454,9 @@ static bool marshal_Tmkdir(struct lib9p_ctx *ctx, struct lib9p_msg_Tmkdir *val,
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 72);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(72));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->dfid);
MARSHAL_U16LE(ctx, val->name.len);
@@ -4467,7 +4467,7 @@ static bool marshal_Tmkdir(struct lib9p_ctx *ctx, struct lib9p_msg_Tmkdir *val,
}
static bool marshal_Rmkdir(struct lib9p_ctx *ctx, struct lib9p_msg_Rmkdir *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 20;
+ uint32_t needed_size = (uint32_t)(20);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rmkdir",
@@ -4476,9 +4476,9 @@ static bool marshal_Rmkdir(struct lib9p_ctx *ctx, struct lib9p_msg_Rmkdir *val,
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 73);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(73));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U8LE(ctx, val->qid.type & qt_masks[ctx->version]);
MARSHAL_U32LE(ctx, val->qid.vers);
@@ -4487,7 +4487,7 @@ static bool marshal_Rmkdir(struct lib9p_ctx *ctx, struct lib9p_msg_Rmkdir *val,
}
static bool marshal_Trenameat(struct lib9p_ctx *ctx, struct lib9p_msg_Trenameat *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 19 + val->oldname.len + val->newname.len;
+ uint32_t needed_size = (uint32_t)(19 + val->oldname.len + val->newname.len);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Trenameat",
@@ -4496,9 +4496,9 @@ static bool marshal_Trenameat(struct lib9p_ctx *ctx, struct lib9p_msg_Trenameat
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 74);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(74));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->olddirfid);
MARSHAL_U16LE(ctx, val->oldname.len);
@@ -4510,7 +4510,7 @@ static bool marshal_Trenameat(struct lib9p_ctx *ctx, struct lib9p_msg_Trenameat
}
static bool marshal_Rrenameat(struct lib9p_ctx *ctx, struct lib9p_msg_Rrenameat *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 7;
+ uint32_t needed_size = (uint32_t)(7);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rrenameat",
@@ -4519,15 +4519,15 @@ static bool marshal_Rrenameat(struct lib9p_ctx *ctx, struct lib9p_msg_Rrenameat
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 75);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(75));
MARSHAL_U16LE(ctx, val->tag);
return false;
}
static bool marshal_Tunlinkat(struct lib9p_ctx *ctx, struct lib9p_msg_Tunlinkat *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 17 + val->name.len;
+ uint32_t needed_size = (uint32_t)(17 + val->name.len);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Tunlinkat",
@@ -4536,9 +4536,9 @@ static bool marshal_Tunlinkat(struct lib9p_ctx *ctx, struct lib9p_msg_Tunlinkat
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 76);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(76));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->dirfd);
MARSHAL_U16LE(ctx, val->name.len);
@@ -4548,7 +4548,7 @@ static bool marshal_Tunlinkat(struct lib9p_ctx *ctx, struct lib9p_msg_Tunlinkat
}
static bool marshal_Runlinkat(struct lib9p_ctx *ctx, struct lib9p_msg_Runlinkat *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 7;
+ uint32_t needed_size = (uint32_t)(7);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Runlinkat",
@@ -4557,9 +4557,9 @@ static bool marshal_Runlinkat(struct lib9p_ctx *ctx, struct lib9p_msg_Runlinkat
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 77);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(77));
MARSHAL_U16LE(ctx, val->tag);
return false;
}
@@ -4567,7 +4567,7 @@ static bool marshal_Runlinkat(struct lib9p_ctx *ctx, struct lib9p_msg_Runlinkat
#endif /* CONFIG_9P_ENABLE_9P2000_L */
#if CONFIG_9P_ENABLE_9P2000_e
static bool marshal_Tsession(struct lib9p_ctx *ctx, struct lib9p_msg_Tsession *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 15;
+ uint32_t needed_size = (uint32_t)(15);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Tsession",
@@ -4576,16 +4576,16 @@ static bool marshal_Tsession(struct lib9p_ctx *ctx, struct lib9p_msg_Tsession *v
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 150);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(150));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U64LE(ctx, val->key);
return false;
}
static bool marshal_Rsession(struct lib9p_ctx *ctx, struct lib9p_msg_Rsession *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 7;
+ uint32_t needed_size = (uint32_t)(7);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rsession",
@@ -4594,15 +4594,15 @@ static bool marshal_Rsession(struct lib9p_ctx *ctx, struct lib9p_msg_Rsession *v
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 151);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(151));
MARSHAL_U16LE(ctx, val->tag);
return false;
}
static bool marshal_Tsread(struct lib9p_ctx *ctx, struct lib9p_msg_Tsread *val, struct _marshal_ret *ret) {
- uint64_t needed_size = 13;
+ uint64_t needed_size = (uint64_t)(13);
for (uint16_t i = 0; i < val->nwname; i++) {
needed_size += 2 + val->wname[i].len;
}
@@ -4614,9 +4614,9 @@ static bool marshal_Tsread(struct lib9p_ctx *ctx, struct lib9p_msg_Tsread *val,
return true;
}
uint32_t offsetof_end = (uint32_t)needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 152);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(152));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
MARSHAL_U16LE(ctx, val->nwname);
@@ -4628,7 +4628,7 @@ static bool marshal_Tsread(struct lib9p_ctx *ctx, struct lib9p_msg_Tsread *val,
}
static bool marshal_Rsread(struct lib9p_ctx *ctx, struct lib9p_msg_Rsread *val, struct _marshal_ret *ret) {
- uint64_t needed_size = 11 + val->count;
+ uint64_t needed_size = (uint64_t)(11 + val->count);
if (needed_size > (uint64_t)(ctx->max_msg_size)) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu64" > %"PRIu32")",
"Rsread",
@@ -4637,9 +4637,9 @@ static bool marshal_Rsread(struct lib9p_ctx *ctx, struct lib9p_msg_Rsread *val,
return true;
}
uint32_t offsetof_end = (uint32_t)needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 153);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(153));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->count);
MARSHAL_BYTES_ZEROCOPY(ctx, val->data, val->count);
@@ -4647,7 +4647,7 @@ static bool marshal_Rsread(struct lib9p_ctx *ctx, struct lib9p_msg_Rsread *val,
}
static bool marshal_Tswrite(struct lib9p_ctx *ctx, struct lib9p_msg_Tswrite *val, struct _marshal_ret *ret) {
- uint64_t needed_size = 17 + val->count;
+ uint64_t needed_size = (uint64_t)(17 + val->count);
for (uint16_t i = 0; i < val->nwname; i++) {
needed_size += 2 + val->wname[i].len;
}
@@ -4659,9 +4659,9 @@ static bool marshal_Tswrite(struct lib9p_ctx *ctx, struct lib9p_msg_Tswrite *val
return true;
}
uint32_t offsetof_end = (uint32_t)needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 154);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(154));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->fid);
MARSHAL_U16LE(ctx, val->nwname);
@@ -4675,7 +4675,7 @@ static bool marshal_Tswrite(struct lib9p_ctx *ctx, struct lib9p_msg_Tswrite *val
}
static bool marshal_Rswrite(struct lib9p_ctx *ctx, struct lib9p_msg_Rswrite *val, struct _marshal_ret *ret) {
- uint32_t needed_size = 11;
+ uint32_t needed_size = (uint32_t)(11);
if (needed_size > ctx->max_msg_size) {
lib9p_errorf(ctx, LIB9P_ERRNO_L_ERANGE, "%s message too large to marshal into %s limit (%"PRIu32" > %"PRIu32")",
"Rswrite",
@@ -4684,9 +4684,9 @@ static bool marshal_Rswrite(struct lib9p_ctx *ctx, struct lib9p_msg_Rswrite *val
return true;
}
uint32_t offsetof_end = needed_size;
- uint32_t offsetof_size = 0;
- MARSHAL_U32LE(ctx, offsetof_end - offsetof_size);
- MARSHAL_U8LE(ctx, 155);
+ uint32_t offsetof_size = (uint32_t)(0);
+ MARSHAL_U32LE(ctx, (uint32_t)(offsetof_end - offsetof_size));
+ MARSHAL_U8LE(ctx, (uint8_t)(155));
MARSHAL_U16LE(ctx, val->tag);
MARSHAL_U32LE(ctx, val->count);
return false;