Skip to content

Commit

Permalink
sample to fix
Browse files Browse the repository at this point in the history
  • Loading branch information
thradams committed Mar 24, 2024
1 parent fc596ef commit 82bee4c
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/file.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
void* _Owner malloc(unsigned long size);
void free(void* _Owner ptr);

struct Z {
char* _Owner nameZ;
};

struct Y {
char* _Owner nameY;
struct Z *pZ;
};

struct X {
char* _Owner name;
char* _Owner nameX;
struct Y *pY;
};

void f(struct X * p)
{
static_debug(p);
}
int main()
{
struct X* p = (struct X* _Owner) malloc(1);

}

//flow analyze
#pragma cake diagnostic check "-Wmissing-owner-qualifier"

0 comments on commit 82bee4c

Please sign in to comment.