Skip to content

枚举变量非对齐访问问题 #99

@tulumao

Description

@tulumao

在mattclient.h中,定义了枚举类型
typedef enum mqtt_qos {
QOS0 = 0,
QOS1 = 1,
QOS2 = 2,
SUBFAIL = 0x80
} mqtt_qos_t;
后面的代码中,对QoS有个指针强转,而enum的长度并不固定,有一定的概率引起非对齐访问的问题。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions