Abraxas/CCS  Home  Table of Contents

Module - 96.html

ABRAXAS SOFTWARE - CodeCheck CCS Test-Suite

CCS -C Test Suite for Module - 96.cpp

/*

96) Don't memcpy or memcmp non-PODs.

*/
template  class T96 {};
void



Function Name: f96()

f96(void) {
    T96 m1(new int), m2(new int);

// bad 96, don't use memcpy

    memcpy( &m1, &m2, sizeof(m1) );

// bad 96, don't use memcmp

    if ( memcmp(m1, m2, sizeof(m1)) ) {
    }
}

Abraxas/CCS  Home  Table of Contents

ABRAXAS SOFTWARE - CodeCheck CCS Test-Suite CCS