Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

esp-idf 编译出现问题 #1

Closed
liantianji opened this issue Apr 28, 2021 · 1 comment
Closed

esp-idf 编译出现问题 #1

liantianji opened this issue Apr 28, 2021 · 1 comment

Comments

@liantianji
Copy link

../main/gatts_demo.c: In function 'app_main':
../main/gatts_demo.c:825:40: error: '/devSub' directive writing 7 bytes into a region of size between 4 and 20 [-Werror=format-overflow=]
sprintf(MqttTopicSub, "/esp32-c3/%s/devSub", deviceUUID);
^~~~~~~
../main/gatts_demo.c:825:5: note: 'sprintf' output between 18 and 34 bytes into a destination of size 30
sprintf(MqttTopicSub, "/esp32-c3/%s/devSub", deviceUUID);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../main/gatts_demo.c:827:40: error: '/devPub' directive writing 7 bytes into a region of size between 4 and 20 [-Werror=format-overflow=]
sprintf(MqttTopicPub, "/esp32-c3/%s/devPub", deviceUUID);
^~~~~~~
../main/gatts_demo.c:827:5: note: 'sprintf' output between 18 and 34 bytes into a destination of size 30
sprintf(MqttTopicPub, "/esp32-c3/%s/devPub", deviceUUID);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1.exe: some warnings being treated as errors
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

@liantianji
Copy link
Author

修改MqttTopicSub长度后可以了!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant