Skip to content

Change a %u to use PRIu32 #107

Description

@ssilverman

printf("%03u ", rng(1000));

My compiler warns (actually errors because I like to use -Werror) on %u needing an unsigned int but is given a long unsigned int. A suggested solution:

  1. Include <cinttypes>
  2. Change printf to: printf("%03" PRIu32 " ", rng(1000));

Metadata

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