Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Quantifier const in strlen #44

Open
Nisiyama-Suzune opened this issue Oct 22, 2019 · 0 comments
Open

Quantifier const in strlen #44

Nisiyama-Suzune opened this issue Oct 22, 2019 · 0 comments

Comments

@Nisiyama-Suzune
Copy link


../keyedge/ocalls_eapp.h: In function 'print_string':
../keyedge/ocalls_eapp.h:34:39: error: passing argument 1 of 'strlen' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
  size_t __0_msg_keyedge_size = strlen(msg) + 1;
                                       ^~~
In file included from ../keyedge/flatbuffers_common_reader.h:221:0,
                 from ../keyedge/ocalls_reader.h:7,
                 from ../keyedge/ocalls_builder.h:7,
                 from ../keyedge/ocalls_eapp.h:6,
                 from eapp.c:2:
/home/nisiyama/keystone/sdk/lib/app/include/string.h:9:8: note: expected 'char *' but argument is of type 'const char *'
 size_t strlen(char* str);
        ^~~~~~

I think we might have dropped the const part of const char* in strlen. Is it intentional?

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

No branches or pull requests

1 participant