Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/generated/stdout/quic_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ char * casted_clog_bytearray(const uint8_t * const data,
}


void clog_stdout(struct clog_param * head, const char * const format, ...)
void clog_stdout(struct clog_param ** head_ptr, const char * const format, ...)
{
struct clog_param * head = *head_ptr;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this generated code? Is it going to survive the next generation?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(looking more, the file does seem generated, which raises questions about what it is doing in a "generated" folder).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the "CLOG should generate at build time" problem?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file is in a generated folder but it's not auto-generated by any build tooling — it's hand-maintained code that was placed there historically. There's no generation step that would overwrite these changes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you answer me and not @guhetier?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the "CLOG should generate at build time" problem?

Not really, more that we seem to have a mix of generated and non-generated files in the same folder. Not a big issue, just slightly confusing. Maybe we can fix this one day to scratch the itch, but not worth a bug imo.

char * reformat;

if (strstr(format, "%!") == 0) {
Expand Down
6 changes: 3 additions & 3 deletions src/inc/quic_trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ extern
"C"
#endif
void //__attribute__((no_instrument_function, format(printf, 2, 3)))
clog_stdout(struct clog_param * head, const char * format, ...);
clog_stdout(struct clog_param ** head, const char * format, ...);
#else
QUIC_INLINE void //__attribute__((no_instrument_function, format(printf, 2, 3)))
clog_stdout(struct clog_param * head, const char * format, ...)
clog_stdout(struct clog_param ** head, const char * format, ...)
{
UNREFERENCED_PARAMETER(head);
UNREFERENCED_PARAMETER(format);
Expand All @@ -178,7 +178,7 @@ clog_stdout(struct clog_param * head, const char * format, ...)
#define clog(Fmt, ...) \
do { \
struct clog_param * __head = 0; \
clog_stdout(__head, (Fmt), ##__VA_ARGS__); \
clog_stdout(&__head, (Fmt), ##__VA_ARGS__); \
} while (0)

#endif
Expand Down
Loading