1th: Compile cleanly at high warning level

Source: Internet
Author: User

A high degree of caution, using the compiler's highest warning level, requires a neat construction (no warning), an understanding of all warnings, and elimination by modifying the code rather than by lowering the warning level. The way to exclude a warning is to get it clear first, then rewrite the code to exclude the warning and make the code reader and compiler clearer.

A successful build should be silent, even if it starts to work properly, but it may hide the danger of future real warnings.

For example, warning signed and unsigned mismatches (signed/unsigned mismatch), there is usually no need to compare and assign different integers to the symbol, and the type of operation should be changed to make the type match.

1th: Compile cleanly at high warning level

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.