diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-10-16 13:57:39 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-10-16 16:07:46 -0400 |
commit | 62667b49e9f580bf5f86b1bee91f96232bf3e381 (patch) | |
tree | fde13d797b70f4c5394bce59ca716eb256527120 /scripts/codegen | |
parent | 5032b8f1783cad70675cdb07e00eb184f256a6e3 (diff) | |
download | tor-62667b49e9f580bf5f86b1bee91f96232bf3e381.tar.gz tor-62667b49e9f580bf5f86b1bee91f96232bf3e381.zip |
Regenerate extample_extrainfo.inc and adjust tests.
Diffstat (limited to 'scripts/codegen')
-rw-r--r-- | scripts/codegen/makedesc.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/codegen/makedesc.py b/scripts/codegen/makedesc.py index 10941cc3fa..5c59a52af1 100644 --- a/scripts/codegen/makedesc.py +++ b/scripts/codegen/makedesc.py @@ -345,14 +345,15 @@ def emit_ri(name, body): body = info.sign_desc(body) print_c_string("EX_RI_%s"%name.upper(), body) -def emit_ei(name, body): +def emit_ei(name, body, fields): info = OnDemandKeys() body = body.format(d=info) body = info.sign_desc(body) print_c_string("EX_EI_%s"%name.upper(), body) - print('const char EX_EI_{NAME}_FP[] = "{d.RSA_FINGERPRINT_NOSPACE}";'.format( + print('ATTR_UNUSED static const char EX_EI_{NAME}_FP[] = "{d.RSA_FINGERPRINT_NOSPACE}";'.format( d=info, NAME=name.upper())) + print("ATTR_UNUSED") print_c_string("EX_EI_%s_KEY"%name.upper(), info.RSA_IDENTITY) def analyze(s): @@ -387,7 +388,7 @@ def emit_entry(fields, s): raise ValueError("missing required field") if tp == 'ei': - emit_ei(name, s) + emit_ei(name, s, fields) elif tp == 'ri': emit_ri(name, s) else: |