core-lightning/tools/gen/print_header_template
Rusty Russell 2e68b88be8 tools: fix tlv generation
We need to hand -s to both header and body generation, or neither:

wire/gen_peer_wire.c:53:13: error: static declaration of ‘towire_channel_update_timestamps’ follows non-static declaration
In file included from wire/gen_peer_wire.c:5:
./wire/gen_peer_wire.h:78:6: note: previous declaration of ‘towire_channel_update_timestamps’ was here

We also need it for printwire, otherwise we get static unused functions for subtypes:

devtools/gen_print_wire.c:155:13: error: ‘printwire_channel_update_checksums’ defined but not used [-Werror=unused-function]
 static void printwire_channel_update_checksums(const char *fieldname, const u8 **cursor, size_t *plen)
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
devtools/gen_print_wire.c:133:13: error: ‘printwire_channel_update_timestamps’ defined but not used [-Werror=unused-function]
 static void printwire_channel_update_timestamps(const char *fieldname, const u8 **cursor, size_t *plen)
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-07-27 21:19:57 -05:00

27 lines
764 B
Plaintext

/* This file was generated by generate-wire.py */
/* Do not modify this file! Modify the _csv file it was generated from. */
/* Template located at tools/gen/print_header_template */
#ifndef LIGHTNING_${idem}
#define LIGHTNING_${idem}
#include <ccan/tal/tal.h>
#include <devtools/print_wire.h>
% for i in includes:
${i}
% endfor
void print${options.enum_name}_message(const u8 *msg);
void print${options.enum_name}_tlv_message(const char *tlv_name, const u8 *msg);
% for msg in messages:
void printwire_${msg.name}(const char *fieldname, const u8 *cursor);
% endfor
% if options.expose_subtypes:
% for subtype in subtypes:
void printwire_${subtype.name}(const char *fieldname, const u8 **cursor, size_t *plen);
% endfor
% endif
#endif /* LIGHTNING_${idem} */