Versions Compared

Key

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

...

Code Block
bgColor#ffcccc
langc
#include <signal.h>

sig_atomic_t interrupted;   /* Bug: not declared volatile */

void sigint_handler(int signum) {
  interrupted = 1;   /* Assignment may not be visible in main(). */
}

int main(void) {
  signal(SIGINT, sigint_handler);
  while (!interrupted) {   /* Loop may never terminate. */
   /* Do something */
  }
  return 0;
}

...

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

DCL34-C

lowLow

probableProbable

highHigh

P2

L3

Automated Detection

Tool

Version

Checker

Description

PRQA QA-C
Include Page
PRQA_V
PRQA_V
2782Partially implemented

...