Skip to content
Commit 84ea4b10 authored by Patrick Williams's avatar Patrick Williams
Browse files

json-html-serializer: fix clang-tidy warning



```
../include/json_html_serializer.hpp:426:42: error: 'end' declared with a const-qualified typedef; results in the type being 'char *const' instead of 'const char *' [misc-misplaced-const,-warnings-as-errors]
    const std::array<char, 64>::iterator end =
                                         ^
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/array:106:44: note: typedef declared here
      typedef value_type*                             iterator;
../include/json_html_serializer.hpp:165:60: error: unsafe pointer arithmetic [-Werror,-Wunsafe-buffer-usage]
                                std::snprintf(stringBuffer.data() + bytes, 7,
../include/json_html_serializer.hpp:327:11: error: 'bufferPtr' is an unsafe pointer used for buffer access [-Werror,-Wunsafe-buffer-usage]
    auto* bufferPtr = begin(numberbuffer);
../include/json_html_serializer.hpp:393:11: error: 'begin' is an unsafe pointer used for buffer access [-Werror,-Wunsafe-buffer-usage]
    char* begin = numberbuffer.data();
../include/json_html_serializer.hpp:425:56: error: unsafe pointer arithmetic [-Werror,-Wunsafe-buffer-usage]
        std::remove(numberbuffer.begin(), numberbuffer.begin() + len, ',');
```

Signed-off-by: default avatarPatrick Williams <patrick@stwcx.xyz>
Change-Id: If6aaf038c939ad76da73e68e746a56b0905b2804
parent 3d7fc71e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment