-
Notifications
You must be signed in to change notification settings - Fork 174
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
Fix compilation with -DHAVE_STATS=0 #5
Changes from all commits
2ce77d9
63e08a0
559e9a7
c8057a7
ebc5ef5
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 |
---|---|---|
|
@@ -44,8 +44,9 @@ procinfo_teardown(void) | |
procinfo_init = false; | ||
} | ||
|
||
#if defined CC_STATS && CC_STATS == 1 | ||
This comment was marked as spam.
Sorry, something went wrong. 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. Why not? I believe (didn't check again) it'll fail to compile if it references structsb properties that do not exist. 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. Yeah, just confirmed
(and a bunch more) |
||
void | ||
procinfo_update(void) | ||
_procinfo_update(void) | ||
{ | ||
struct rusage usage; | ||
|
||
|
@@ -78,3 +79,4 @@ procinfo_update(void) | |
procinfo_metrics->ru_nvcsw.vintmax = (intmax_t)usage.ru_nvcsw; | ||
procinfo_metrics->ru_nivcsw.vintmax = (intmax_t)usage.ru_nivcsw; | ||
} | ||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,4 +37,9 @@ typedef struct { | |
void procinfo_setup(procinfo_metrics_st *procinfo_metrics); | ||
void procinfo_teardown(void); | ||
|
||
void procinfo_update(void); | ||
#if defined CC_STATS && CC_STATS == 1 | ||
void _procinfo_update(void); | ||
This comment was marked as spam.
Sorry, something went wrong. 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. are you trying to fix the warning in #5 (comment) but ignoring the errors? 😀 the problem is not that it has a warning, the problem is it does not compile because
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong. |
||
#define procinfo_update() _procinfo_update() | ||
#else | ||
#define procinfo_update() | ||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -417,6 +417,7 @@ START_TEST(test_insert_insert_expire_swap) | |
#undef NOW | ||
} | ||
END_TEST | ||
|
||
/* | ||
* test suite | ||
*/ | ||
|
This comment was marked as spam.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the warning:
This comment was marked as spam.
Sorry, something went wrong.