Invalid warnings from Intellisense

Sysprogs forums Forums VisualGDB Invalid warnings from Intellisense

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #28835
    vajoe
    Participant

    I started with a simple raspberry pi cross compile program.  I started adding code and Clang Intellisense is throwing invalid warnings.

    I have the function open in the program.  It throws a the following warning:

    [Clang Intellisense] Warning: implicit declaration of function ‘open’ is invalid in C99

    How is that possible when I have included the following headers:

    errno.h
    fcntl.h
    errno.h
    stdio.h
    stdlib.h
    unistd.h
    sys/types.h
    sys/stat.h

    I also get the following message:

    [Clang IntelliSense] include the header <stdlib.h> or explicitly provide a declaration for ‘exit’

    No idea why it would say that, when the header is clearly included.  There must be some setting I am missing or does Intellisense not work with cross compile?   When I ask Intellisense to search for a header containing one of the functions it complains about, it can’t find any.  Yet the cross compile builds with out problems.

    Any ideas?  Thanks

    #28838
    support
    Keymaster

    Hi,

    This is likely by design, as you have not included the header file declaring the function. This will not cause a critical build error, since C99 does support implicit declarations.

    You can read more about this warning, and implicit declarations here: https://stackoverflow.com/questions/32703675/implicit-declaration-of-function-enterchar-wimplicit-function-declaration?rq=1

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.