Conversation
| void display_time_diff(time_t time1, time_t time2) | ||
| { | ||
| char buf[BUF_SIZE]; | ||
| time_t the_time = time2 - time1; | ||
| char t = ctime(&the_time); | ||
|
|
||
| sprintf(buf, "\n\nTime difference is %s\n\n", t); | ||
| print_string(buf); |
There was a problem hiding this comment.
[clang-format-pr] reported by reviewdog 🐶
| void display_time_diff(time_t time1, time_t time2) | |
| { | |
| char buf[BUF_SIZE]; | |
| time_t the_time = time2 - time1; | |
| char t = ctime(&the_time); | |
| sprintf(buf, "\n\nTime difference is %s\n\n", t); | |
| print_string(buf); | |
| void display_time_diff(time_t time1, time_t time2) { | |
| char buf[BUF_SIZE]; | |
| time_t the_time = time2 - time1; | |
| char t = ctime(&the_time); | |
| sprintf(buf, "\n\nTime difference is %s\n\n", t); | |
| print_string(buf); |
| sprintf(buf, "\n\nTime difference is %s\n\n", t); | ||
| print_string(buf); | ||
| } | ||
|
|
There was a problem hiding this comment.
[clang-format-pr] reported by reviewdog 🐶
| * Print the time diff from current time | ||
| */ | ||
| void display_time_diff(time_t old_time) | ||
| void display_time_diff_from_now(time_t old_time) |
Check failure
Code scanning / C/C++test
A declaration shall be visible when an object or function with external linkage is defined Error
| * Print the time diff from current time | ||
| */ | ||
| void display_time_diff(time_t old_time) | ||
| void display_time_diff_from_now(time_t old_time) |
Check failure
Code scanning / C/C++test
The types defined in the library <time.h> shall not be used Error
| /* | ||
| * Print the time difference | ||
| */ | ||
| void display_time_diff(time_t time1, time_t time2) |
Check failure
Code scanning / C/C++test
A declaration shall be visible when an object or function with external linkage is defined Error
| /* | ||
| * Print the time difference | ||
| */ | ||
| void display_time_diff(time_t time1, time_t time2) |
Check failure
Code scanning / C/C++test
The types defined in the library <time.h> shall not be used Error
| /* | ||
| * Print the time difference | ||
| */ | ||
| void display_time_diff(time_t time1, time_t time2) |
Check failure
Code scanning / C/C++test
The types defined in the library <time.h> shall not be used Error
| { | ||
| char buf[BUF_SIZE]; | ||
| time_t the_time = time2 - time1; | ||
| char t = ctime(&the_time); |
Check warning
Code scanning / C/C++test
A conversion should not be performed between a pointer to object and an integer type Warning
| { | ||
| char buf[BUF_SIZE]; | ||
| time_t the_time = time2 - time1; | ||
| char t = ctime(&the_time); |
Check failure
Code scanning / C/C++test
The time handling functions and macros of the library <time.h> shall not be used Error
| time_t the_time = time2 - time1; | ||
| char t = ctime(&the_time); | ||
|
|
||
| sprintf(buf, "\n\nTime difference is %s\n\n", t); |
Check failure
Code scanning / C/C++test
The input/output functions from the 'cstdio' and 'cwchar' libraries should not be used Error
| time_t the_time = time2 - time1; | ||
| char t = ctime(&the_time); | ||
|
|
||
| sprintf(buf, "\n\nTime difference is %s\n\n", t); |
Check failure
Code scanning / C/C++test
The value returned by a function having non-void return type shall be used Error
| char t = ctime(&the_time); | ||
|
|
||
| sprintf(buf, "\n\nTime difference is %s\n\n", t); | ||
| print_string(buf); |
Check failure
Code scanning / C/C++test
The value returned by a function having non-void return type shall be used Error
Test reviewdog