Kernel: Module symbol declarations for type-checking

With this, if a future module misses the 'extern "C"' or uses a wrong type,
they get a nice compiler error instead of runtime errors or weird behavior.

Also, this works towards getting the Kernel ready for -Wmissing-declarations.
This commit is contained in:
Ben Wiederhake
2020-08-11 23:47:18 +02:00
committed by Andreas Kling
parent 7abd9c81c6
commit ff16da8c77
2 changed files with 33 additions and 1 deletions

View File

@@ -24,7 +24,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <Kernel/Process.h>
#include <AK/LogStream.h>
#include <Kernel/Modules/module_syms.h>
extern "C" const char module_name[] = "TestModule";