Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
varnishevent
Commits
9c8190fb
Commit
9c8190fb
authored
Dec 07, 2016
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
silence a warning from clang
parent
eb3f1e37
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
data.c
src/data.c
+4
-3
data.h
src/data.h
+1
-1
test_data.c
src/test/test_data.c
+3
-1
No files found.
src/data.c
View file @
9c8190fb
...
...
@@ -46,6 +46,7 @@
#include "vqueue.h"
#include "vsb.h"
#include "vmb.h"
#include "common/common.h"
#define __offsetof(st, m) offsetof(st,m)
...
...
@@ -73,8 +74,8 @@ static txhead_t freetxhead;
static
rechead_t
freerechead
;
static
chunkhead_t
freechunkhead
;
static
char
bogus_rec
;
rec_t
*
const
magic_end_rec
=
(
rec_t
*
const
)
&
bogus_rec
;
static
c
onst
c
har
bogus_rec
;
const
void
*
const
magic_end_rec
=
&
bogus_rec
;
static
void
data_Cleanup
(
void
)
...
...
@@ -268,7 +269,7 @@ DATA_Init(void)
}
txn
[
i
].
recs
[
idx
]
->
hdrs
=
(
rec_t
**
)
calloc
(
nhdrs
+
1
,
sizeof
(
rec_t
*
));
txn
[
i
].
recs
[
idx
]
->
hdrs
[
nhdrs
]
=
magic_end_rec
;
txn
[
i
].
recs
[
idx
]
->
hdrs
[
nhdrs
]
=
TRUST_ME
(
magic_end_rec
)
;
}
VSTAILQ_INSERT_TAIL
(
&
freetxhead
,
&
txn
[
i
],
freelist
);
}
...
...
src/data.h
View file @
9c8190fb
...
...
@@ -31,4 +31,4 @@
#include "varnishevent.h"
extern
rec_t
*
const
magic_end_rec
;
extern
const
void
*
const
magic_end_rec
;
src/test/test_data.c
View file @
9c8190fb
...
...
@@ -32,6 +32,8 @@
#include <string.h>
#include <stddef.h>
#include "common/common.h"
#include "minunit.h"
#include "../varnishevent.h"
...
...
@@ -376,7 +378,7 @@ static const char
fill_rec
(
&
records
[
idx
],
&
chunks
[
idx
*
CHUNKS_PER_REC
],
CHUNKS_PER_REC
);
}
rec_nodes
[
i
].
hdrs
[
HDRS_PER_NODE
]
=
magic_end_rec
;
rec_nodes
[
i
].
hdrs
[
HDRS_PER_NODE
]
=
TRUST_ME
(
magic_end_rec
)
;
}
DATA_Clear_Tx
(
&
tx
,
&
local_freetx
,
&
local_freerec
,
&
local_freechunk
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment