]> git.mdlowis.com Git - proto/labwc.git/commit
src: avoid tentative definitions of static data
authorJohn Lindgren <john@jlindgren.net>
Fri, 4 Jul 2025 04:12:21 +0000 (00:12 -0400)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Mon, 21 Jul 2025 14:51:10 +0000 (16:51 +0200)
commita802d6b20ab0d0f33806e1e33118a711ba1277a6
tree949efbffe320a2a5e86af2bf4cc0effb714cfdda
parent407a29aa239dd7c4a0ee90ccd08529229457d8ce
src: avoid tentative definitions of static data

Having multiple declarations of the same static data (where one is
considered "tentative") is kind of an obscure C feature -- I didn't
even know the name of it until today. It's also forbidden in C++.

In the case of circular dependencies between static data <-> function,
the more typical pattern is to forward-declare the function, then the
data, then provide the function definition. Let's follow that pattern.
src/buffer.c
src/osd-field.c