Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

An application programming interface (API) specifies how a function is intended to be called.   Calling a function with incorrect arguments can result in unexpected or unintended program behavior. Functions that are appropriately declared (see DCL07-C. Include the appropriate type information in function declarators) will typically fail compilation if they are supplied with the wrong number or types of arguments. However, there are cases where supplying the incorrect arguments to a function will at best generate compiler warnings. These warnings should be resolved (see MSC00-C. Compile cleanly at high warning levels) but do not prevent program compilation.

...

Compass/ROSE can detect some violations of this rule. In particular, it ensures that all calls to open() supply three arguments.

...