Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5d13645b authored by Chih-Hung Hsieh's avatar Chih-Hung Hsieh
Browse files

Fix bugprone-string-integer-assignment warnings

* mdns.cpp:153:20: warning: an integer is interpreted as a character code
  when assigning it to a string; if this is intended, cast the integer to
  the appropriate character type; if you want a string representation, use
  the appropriate conversion facility [bugprone-string-integer-assignment]

Test: WITH_TIDY=1 make
Change-Id: Id9a790ac31722c6ee8886703939977b913ce95fe
parent cc642ec7
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -150,11 +150,11 @@ static std::string RandomAlphaNumString(size_t len) {
    for (size_t i = 0; i < len; ++i) {
        uint8_t val = dist(mt);
        if (val < 10) {
            ret += '0' + val;
            ret += static_cast<char>('0' + val);
        } else if (val < 36) {
            ret += 'A' + (val - 10);
            ret += static_cast<char>('A' + (val - 10));
        } else {
            ret += 'a' + (val - 36);
            ret += static_cast<char>('a' + (val - 36));
        }
    }
    return ret;