-
Notifications
You must be signed in to change notification settings - Fork 9
Fix nmsgtool compiler warning when building without rdkafka/json-c #181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -351,18 +351,13 @@ add_kafka_input(nmsgtool_ctx *c, const char *str_address) { | |
| _add_kafka_nmsg_input(c, addr); | ||
| return; | ||
| } | ||
| #ifdef HAVE_JSON_C | ||
| addr = _strip_prefix_if_exists(str_address, "json:"); | ||
| if (addr != NULL) { | ||
| _add_kafka_json_input(c, addr); | ||
| return; | ||
| } | ||
| fprintf(stderr, "%s: Error: nmsg or json protocol must be set for Kafka topic\n", | ||
| argv_program); | ||
| #else /* HAVE_JSON_C */ | ||
| fprintf(stderr, "%s: Error: nmsg protocol must be set for Kafka topic\n", | ||
| argv_program); | ||
| #endif /* HAVE_JSON_C */ | ||
| exit(EXIT_FAILURE); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a bit weird, but these calls to |
||
| } | ||
|
|
||
|
|
@@ -373,18 +368,13 @@ add_kafka_output(nmsgtool_ctx *c, const char *str_address) { | |
| _add_kafka_nmsg_output(c, addr); | ||
| return; | ||
| } | ||
| #ifdef HAVE_JSON_C | ||
| addr = _strip_prefix_if_exists(str_address, "json:"); | ||
| if (addr != NULL) { | ||
| _add_kafka_json_output(c, addr); | ||
| return; | ||
| } | ||
| fprintf(stderr, "%s: Error: nmsg or json protocol must be set for Kafka topic\n", | ||
| argv_program); | ||
| #else /* HAVE_JSON_C */ | ||
| fprintf(stderr, "%s: Error: nmsg protocol must be set for Kafka topic\n", | ||
| argv_program); | ||
| #endif /* HAVE_JSON_C */ | ||
| exit(EXIT_FAILURE); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same instruction as above
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added back the |
||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.