TokTok / toxic

An ncurses-based Tox client
https://toktok.ltd/
GNU General Public License v3.0
29 stars 4 forks source link

cleanup: remove an accidental VLA #303

Closed JFreegman closed 9 months ago

JFreegman commented 9 months ago

We don't use these in Toxic


This change is Reviewable

robinlinden commented 9 months ago

Maybe add a compiler warning for it on CI?

Makefile contains -Wvla, so I'm surprised this was fine. CFLAGS ?= -std=c11 -pthread -Wall -Wpedantic -Wunused -fstack-protector-all -Wvla -Wno-missing-braces

JFreegman commented 9 months ago

The only reason I even noticed is because I got a compiler warning on a VM with a newer version of gcc. Not sure what's gong there.

Edit: looks like a compiler optimization for strlen on string defines.