Warning-"Old Style Function Definition"

Source: Internet
Author: User

I just used psoc designer5.0 to write the timer16_initisr service interruption function. There was a warning when warning appeared. In the previous version of 4.3, I googled it and found the solution.

question: wh En
I compile a project with new version of psoc designer, I get warning "Old Style Function Definition ". but earlier, this project used to build without any warning. why is this warning generated and how do I remove this warning?

Response:In
Old function definitions, if there is no argument needed to be passed to function, then argument list cocould be left blank. For example, earlier 'main' function cocould be defined:

Void main () { } But now compiler generates a warning, "Old Style Function Definition for 'main'". Though this warning can be safely ignored, if you wowould like to remove this warning, write definition as below: Void main (void) { }
Therefore, when the new compiler is compiled, the void must be supplemented without passing parameters.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.