Splint error: Observer storage returned without qualification: "🟩" , Storage becomes observer

Hello,

can anybody explain me the following error message from splint test:

src/wordle.c:152:20: Observer storage returned without qualification: “:green_square:
src/wordle.c:152:20: Storage becomes observer
src/wordle.c:154:20: Observer storage returned without qualification: “:yellow_square:
src/wordle.c:154:20: Storage becomes observer
src/wordle.c:156:20: Observer storage returned without qualification: “:black_large_square:
src/wordle.c:156:20: Storage becomes observer
src/wordle.c:158:20: Observer storage returned without qualification: “:green_circle:
src/wordle.c:158:20: Storage becomes observer
src/wordle.c:160:21: Observer storage returned without qualification: “:yellow_circle:
src/wordle.c:160:21: Storage becomes observer
src/wordle.c:162:12: Observer storage returned without qualification: “”
src/wordle.c:162:12: Storage becomes observer

Thanks in advance!

You return a string like return "String".
But a string is a constant unmutable char pointer.
Writing or freeing such a pointer is undefined behavior.
Splint tells you that your function should disclose that in its type signature.
You can change the return type to

/*@observer@*/ const char *functionName(args) {...}

to say: The returned pointer is constant and read-only.