Strange compiler warnings in buildbot email

Hello,

in my last buildbot email I was essentially given this:

--- Testing category build ---
---> test compile
Result: successful
Additional info:
Compilation successful

which is then immediately followed by a bunch of warnings which all look like this (note that there is no array called someArray in my code; I changed the name of this array for this post, so I would not spoil anything):

src/wordle.c: In function classicalFeedback:
src/wordle.c:155:14: warning: implicit declaration of function letterToIndex [-Wimplicit-function-declaration]
  155 |         someArray[letterToIndex(word[i])]++;
      |              ^~~~~~~~~~~~~

And despite these warnings the buildbot reports:

Succesfully built binary bin/wordle_opt.

I do not get these errors (or any other error) if I run make check on the VM. What is even stranger is that I pass all tests in the email even though the program should not be able to run if these functions were not defined.

The three functions that are affected (letterToIndex, indexToLetter and meet) have their signatures defined in util.h and are implemented in util.c and of course I include util.h in util.c, dict.c and wordle.c so that the compiler and vscode are aware where they are defined.

What is the reason for these warnings?

The function is indeed defined in util.c.
The problem on the server was that it overwrote your util.h.
The new header file did no longer include your definitions.
Therefore, the functions were no longer referenced (and thus bind to a common interface) in any header file which should be avoided. Thus, the warning was echoed.

It should be fixed now and the server will use your util.h.

1 Like