include::../description.adoc[]

== Noncompliant Code Example

----
void do_something() {
  // ...
  product(7, 9);  // Noncompliant
  // ...
}

int product(int a, int b) {
  return a * b;
}
----

== Compliant Solution

----
void do_something() {
  // ...
  int prod = product(7, 9);
  // ...
}

int product(int a, int b) {
  return a * b;
}
----

== See

* MISRA C:2012, 17.7 - The value returned by a function having non-void return type shall be used
* https://wiki.sei.cmu.edu/confluence/x/mtYxBQ[CERT, EXP12-C.] - Do not ignore values returned by functions

ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)

include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]
