Files
Jonas Jensen cc00f0f584 C++: Move identical declarations to shared.h file
This cleans up the test results, which were confusing because functions
like `sink` had multiple locations.

There are some additional results now involving casts to `const char *`
because previously it varied whether `sink` used `const`, and now it
always does.
2020-05-18 10:42:52 +02:00

25 lines
344 B
C++

#include "shared.h"
void throughLocal() {
char * local = getenv("VAR");
sink(local); // flow
}
char * global1 = 0;
void readWriteGlobal1() {
sink(global1); // flow
global1 = getenv("VAR");
}
static char * global2 = 0;
void readGlobal2() {
sink(global2); // flow
}
void writeGlobal2() {
global2 = getenv("VAR");
}