Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sergi
Tor
Commits
04a74d4a
Commit
04a74d4a
authored
5 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
conftesting.h: when COCCI is defined, disable unhandled macros
parent
3e41459d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/lib/conf/conftesting.h
+5
-4
5 additions, 4 deletions
src/lib/conf/conftesting.h
with
5 additions
and
4 deletions
src/lib/conf/conftesting.h
+
5
−
4
View file @
04a74d4a
...
...
@@ -12,7 +12,9 @@
#ifndef TOR_LIB_CONF_CONFTESTING_H
#define TOR_LIB_CONF_CONFTESTING_H
#ifndef COCCI
#ifdef TOR_UNIT_TESTS
#define USE_CONF_TESTING
/**
* Union used when building in test mode typechecking the members of a type
* used with confparse.c. See CONF_CHECK_VAR_TYPE for a description of how
...
...
@@ -41,12 +43,10 @@ typedef union {
// XXXX this doesn't belong at this level of abstraction.
struct
routerset_t
**
ROUTERSET
;
}
confparse_dummy_values_t
;
#endif
/* defined(TOR_UNIT_TESTS) */
/* Macros to define extra members inside config_var_t fields, and at the
* end of a list of them.
*/
#ifdef TOR_UNIT_TESTS
/* This is a somewhat magic type-checking macro for users of confparse.c.
* It initializes a union member "confparse_dummy_values_t.conftype" with
* the address of a static member "tp_dummy.member". This
...
...
@@ -72,9 +72,10 @@ typedef union {
#define DUMMY_CONF_TEST_MEMBERS , .var_ptr_dummy={ .INT=NULL }
#define DUMMY_TYPECHECK_INSTANCE(tp) \
static tp tp ## _dummy
#endif
#endif
#else
/* !(defined(TOR_UNIT_TESTS)) */
#ifndef USE_CONF_TESTING
#define CONF_TEST_MEMBERS(tp, conftype, member)
/* Repeatedly declarable incomplete struct to absorb redundant semicolons */
#define DUMMY_TYPECHECK_INSTANCE(tp) \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment