Skip to content

Util.c : operation on 's' may be undefined [-Wsequence-point] #10

@efletcherPIFSC

Description

@efletcherPIFSC

Compiler warning flags found possible undefined variable *s++ within UpperCase and LowerCase in util.c

cc -Wall -Wextra  -c -o obj/ranx.o src/ranx.c
gcc -Wall -Wextra  -c -o obj/boxmuller.o src/boxmuller.c
gcc -Wall -Wextra  -c -o obj/util.o src/util.c
src/util.c: In function 'UpperCase':
src/util.c:15:19: warning: operation on 's' may be undefined [-Wsequence-point]
   15 |                 *s++ = toupper(*s);
      |                  ~^~
src/util.c: In function 'LowerCase':
src/util.c:26:19: warning: operation on 's' may be undefined [-Wsequence-point]
   26 |                 *s++ = tolower(*s);
      |                  ~^~

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions