Skip to content

Minor, warning - %zu/%lu in example.simplesvr.cc #571

Closed
@sgarriga

Description

g++ 7.5.0 under Ubuntu is happy using %lu in simplsvr.cc

snprintf(buf, sizeof(buf), "text length: %lu\n", file.content.size());

but g++ 8.3.0 under Raspbian warns it should be %zu

I've spent a few hours searching, but I don't think there's a standard macro in C++ that the preprocessor can use to determine which is correct.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions