diff options
| author | Dan Carpenter <dan.carpenter@linaro.org> | 2025-10-15 16:08:13 +0300 |
|---|---|---|
| committer | Chris Li <sparse@chrisli.org> | 2025-10-16 21:52:33 -0700 |
| commit | fbdde3127b83e6d09e0ba808d7925dd84407f3c6 (patch) | |
| tree | 602d0e365e38d1ed99ad775784728b9135b9c68c /validation | |
| parent | dc9efe442b8949234a6599fdc94dc7221dd040e1 (diff) | |
| download | sparse-dev-master.tar.gz | |
People are adding compile time asserts to check whether strings are
the expected length. In GCC and Clang strlen("foo") is expanded at
compile time so this works, but in Sparse it triggers a "bad constant
expression" warning. Implement expand_strlen() to handle string
literals.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/all/CANiDSCsBAq3Yx4ybarUb_1NkQ-bvfXvWqb-DfqXatkiYJFZWiQ@mail.gmail.com/
Signed-off-by: Chris Li <sparse@chrisli.org>
Diffstat (limited to 'validation')
0 files changed, 0 insertions, 0 deletions
