"Reprint" C Embedded software coding error Crawl list

Source: Internet
Author: User

Original link: http://blog.csdn.net/myaccella/article/details/7008168

Rank Description:

    • This ranking is for the statistics of n-th results
    • The ranking of the daytime products for c written embedded software

Nineth Place: Coding Specification Class

    • Inconsistent naming of variables
    • Operators and expressions are difficult to understand
    • Excessive use of coding techniques reduces readability
    • Direct use of numeric constants rather than macro definitions
    • Inconsistent writing, etc.

Eighth place: interface class

    • Inconsistent function parameter type or number
    • Constants or macros between modules are repeatedly defined and inconsistent
    • header file and library inconsistencies, different versions

Seventh place: Parametric variable class

    • Using uninitialized variables
    • No reset before re-use
    • Inappropriate variable type definition
    • Incomplete initialization
    • Variable Rename

Sixth place: function class

    • Feature Branching not complete
    • Missing some operations or data
    • Incorrect diagnosis of information
    • Lack of debugging and testing capabilities
    • Fault no detection and self-healing function

Fifth place: Resource conflict classes

    • Resources are not protected
    • Improper resource Protection
    • Loss of public resources

Fourth place: low-efficiency tedious class

    • Inefficient algorithm
    • Same block of code repeated multiple times
    • To copy data between blocks in a small step for loop
    • Redundant statements
    • Available Switch/case but with If...if...if statement

Third place: Control Flow class

    • Condition control not complete
    • The starting and ending points of the loop are incorrect
    • Incorrect function call
    • Jump and return not in time
    • Matching operation does not match use

Second place: Exception protection class

    • Omission of necessary protection
    • Protection is not tight enough
    • Unreliable protection handling
    • Assertion Error

First place: Memory usage class

    • Memory leaks
    • Using illegal memory
    • Memory out of Bounds
    • Stack Overflow

"Reprint" C Embedded software coding error Crawl list

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.