RT-Thread-packages / at_device

AT component porting or samples for different devices
Apache License 2.0
215 stars 181 forks source link

fix: struct at_socket_ops * assign error for AT device except ESP8266… #187

Closed luhuadong closed 1 year ago

luhuadong commented 1 year ago

PR #182 修改了 struct at_device_class 的定义,将 socket_ops 成员的 const 限定符去掉了,导致除 ESP8266 以外的其他 AT device 在使用 GCC 编译器编译时出现 warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 编译告警,在 Keil MDK5 中出现 error: #513: a value of type "const struct at_socket_ops *" cannot be assigned to an entity of type "struct at_socket_ops *" 错误。

本提交用于修复该问题,已在 BC28、M26、ESP8266 等模块上验证。