Abraxas/Misra Home  Table of Contents

Module - m127.html

ABRAXAS SOFTWARE - CodeCheck MISRA Test-Suite Misra-C:1998 Misra-C:2004.

Misra-C Test Suite for Module - m127.c

/* Misra C Enforcement Testing */

Misra C Enforcement Testing */

/* Rule 127: Required */

Rule 127: Required */

/* The time handling functions of shall not be used. */

shall not be used. */
#include 
#include "misra.h"
static void
func127 ( void ) 



Function Name: func127()

{
    
struct tm ts;
struct tm *pts;
clock_t tick;
time_t tt1;
time_t tt2;
time_t *ptt = NULL;
double diff;
char *pc;
size_t ss = ( size_t ) 0;
    
    tick = clock (  ) ; /*  RULE 127  */
    tt1 = time ( ptt ) ; /*  RULE 127  */
    tt2 = time ( ptt ) ; /*  RULE 127  */
    diff = difftime ( tt2-tt1 ) ; /*  RULE 127  */
    tt1 = mktime ( &ts ) ; /*  RULE 127  */
    pc = asctime ( &ts ) ; /*  RULE 127  */
    pc = ctime ( &ts ) ; /*  RULE 127  */
    pts = gmtime ( &ts ) ; /*  RULE 127  */
    pts = localtime ( &ts ) ; /*  RULE 127  */
    ss = strftime ( pc,
    ss,
    "%a",
    &ts ) ; /*  RULE 127  */
    
}

Abraxas/Misra Home  Table of Contents

ABRAXAS SOFTWARE - CodeCheck MISRA Test-Suite Misra-C:1998 Misra-C:2004.