C header file is causing warning "ISO C requires a translation unit to contain at least one declaration"
I think the issue is that you don't #include "linked.h"
from linked.c
. The current linked.c
file doesn't have any declarations; it only has one function definition.
To fix this, add this line to linked.c
:
#include "linked.h"
I don't know why it says this is an issue with linked.h
, but it seems to be quite a coincidence that the line number you pointed out just happens to be the line number of the end of linked.c
.
Of course, that may be all this is; a coincidence. So, if that doesn't work, try putting some sort of external declaration in this file. The easiest way to do that is to include a standard header, such as stdio.h
. I would still advise you to #include "linked.h"
from inside linked.c
, though.