C and C++


BADFUNC.FLOAT.DREM : Use of drem

Summary

A use of any of the following, which are obsolete and not available on all systems.
Use remainder() instead.

Properties

Class Name Use of drem
Significance style
Mnemonic BADFUNC.FLOAT.DREM
Categories
CWE CWE:242 Use of Inherently Dangerous Function
  CWE:477 Use of Obsolete Function
  CWE:589 Call to Non-ubiquitous API
CERT-C CERT-C:MSC24-C Do not use deprecated or obsolescent functions
Availability Available for C and C++.
Enabling Checks for this warning class are enabled by default. To disable them, add the following WARNING_FILTER rule to the project configuration file.
WARNING_FILTER += discard class="Use of drem"

Example

#include <math.h>

double rem_four(double d){
  return drem(d,4);  /* "Use of drem" warning issued here
}

Relevant Configuration File Parameters

This class is implemented using a BAD_FUNCTION_* rule set in the general template configuration file.

The following configuration file parameters affect checks for this warning class.