cancel
Showing results for 
Search instead for 
Did you mean: 

The function initialise_monitor_handles() in syscalls.c is not declared correctly

JVERN.18
Associate III

image.png

The correct declaration should be:
void initialise_monitor_handles( void )

This is not very important... but it generates warnings

1 ACCEPTED SOLUTION

Accepted Solutions

Yes, just adding "void" is enough to make the compiler happy (and me too)... and no, I absolutely do not need this function (void, by the way).

View solution in original post

4 REPLIES 4

Please see the community guidelines for how to properly post source code - not as screenshots:

How to write your question to maximize your chances to find a solution

How to insert source code

 


@JVERN.18 wrote:

it generates warnings


What warnings, exactly?

And what build tools & version are you using?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Sorry for the scrrenshots, I'll be more careful next time...

The compiler is LLVM/Clang and the warning is "a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]"

This is not a very important warning, and I see that GNU does not see a problem, but frankly, we're not in the 1980s anymore...


@JVERN.18 wrote:

the warning is "a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]"...


So just changing the declaration to add the 'void' wouldn't fix that warning - you'd still need to add a prototype?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Yes, just adding "void" is enough to make the compiler happy (and me too)... and no, I absolutely do not need this function (void, by the way).