MCPcopy Create free account
hub / github.com/Kitware/CMake / kwsysProcessVolatileFree

Function kwsysProcessVolatileFree

Source/kwsys/ProcessUNIX.c:1490–1502  ·  view source on GitHub ↗

Call the free() function with a pointer to volatile without causing compiler warnings. */

Source from the content-addressed store, hash-verified

1488/* Call the free() function with a pointer to volatile without causing
1489 compiler warnings. */
1490static void kwsysProcessVolatileFree(void volatile* p)
1491{
1492/* clang has made it impossible to free memory that points to volatile
1493 without first using special pragmas to disable a warning... */
1494#if defined(__clang__) && !defined(__INTEL_COMPILER)
1495# pragma clang diagnostic push
1496# pragma clang diagnostic ignored "-Wcast-qual"
1497#endif
1498 free((void*)p); /* The cast will silence most compilers, but not clang. */
1499#if defined(__clang__) && !defined(__INTEL_COMPILER)
1500# pragma clang diagnostic pop
1501#endif
1502}
1503
1504/* Initialize a process control structure for kwsysProcess_Execute. */
1505static int kwsysProcessInitialize(kwsysProcess* cp)

Callers 2

kwsysProcessInitializeFunction · 0.85
kwsysProcessCleanupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…