Skip to content

Commit 1ccd97a

Browse files
dff096past-due
authored andcommitted
Explicitly specify unsigned enum bitfield in JSClosureVar
1 parent 421bda7 commit 1ccd97a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

quickjs/quickjs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ typedef enum {
566566
} JSClosureTypeEnum;
567567

568568
typedef struct JSClosureVar {
569-
JSClosureTypeEnum closure_type : 3;
569+
uint8_t closure_type : 3; /* JSClosureTypeEnum - explicitly use uint8_t to avoid implementation-defined behavior */
570570
uint8_t is_lexical : 1; /* lexical variable */
571571
uint8_t is_const : 1; /* const variable (is_lexical = 1 if is_const = 1 */
572572
uint8_t var_kind : 4; /* see JSVarKindEnum */

0 commit comments

Comments
 (0)