mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-compiler: add explicit cast to fix c++ compilation warning
cast uint8_t node_type field to enum node_type to satisfy c++ stricter type checking while maintaining memory efficiency of 1-byte storage. Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -5572,7 +5572,7 @@ codegen(codegen_scope *s, node *tree, int val)
|
||||
s->lineno = var_head->lineno;
|
||||
|
||||
/* Process variable-sized node directly */
|
||||
enum node_type var_type = var_head->node_type;
|
||||
enum node_type var_type = (enum node_type)var_head->node_type;
|
||||
|
||||
switch (var_type) {
|
||||
case NODE_INT:
|
||||
|
||||
Reference in New Issue
Block a user