Commit 151bec32 authored by jan.koester's avatar jan.koester
Browse files

clean compiler warnings

parent 3df7d082
Loading
Loading
Loading
Loading
+0 −20
Changes for test/quic_test.cpp: 0 added lines, 20 removed lines.
Original line number Diff line number Diff line
@@ -333,26 +333,6 @@ static size_t encodeVarInt(uint64_t value, uint8_t* out) {
    }
}

static uint64_t decodeVarInt(const uint8_t* data, size_t& bytes_read) {
    uint8_t prefix = data[0] >> 6;
    uint64_t value = data[0] & 0x3F;
    
    switch (prefix) {
        case 0: bytes_read = 1; break;
        case 1: bytes_read = 2; value = (value << 8) | data[1]; break;
        case 2: bytes_read = 4; 
            value = (value << 8) | data[1];
            value = (value << 8) | data[2];
            value = (value << 8) | data[3];
            break;
        case 3: bytes_read = 8;
            for (int i = 1; i < 8; ++i)
                value = (value << 8) | data[i];
            break;
    }
    return value;
}

// Build HTTP/3 response with minimal QPACK encoding
static std::vector<uint8_t> buildHttp3Response(uint16_t status_code, const std::string& body,
                                                const std::string& content_type = "text/plain") {