remove unused var
This commit is contained in:
@@ -58,7 +58,6 @@ uint8_t cmds[8][2] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static int global_found = 0;
|
static int global_found = 0;
|
||||||
static int global_found_candidate = 0;
|
|
||||||
static size_t thread_count = 2;
|
static size_t thread_count = 2;
|
||||||
|
|
||||||
static int param_getptr(const char *line, int *bg, int *en, int paramnum) {
|
static int param_getptr(const char *line, int *bg, int *en, int paramnum) {
|
||||||
@@ -305,13 +304,13 @@ int main(int argc, char *argv[]) {
|
|||||||
for (int i = 0; i < thread_count; ++i)
|
for (int i = 0; i < thread_count; ++i)
|
||||||
pthread_join(threads[i], NULL);
|
pthread_join(threads[i], NULL);
|
||||||
|
|
||||||
if (!global_found && !global_found_candidate) {
|
if (global_found == false) {
|
||||||
printf("\nFailed to find a key\n\n");
|
printf("\nFailed to find a key\n\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
t1 = msclock() - t1;
|
t1 = msclock() - t1;
|
||||||
if (t1 > 0)
|
if (t1 > 0)
|
||||||
printf("Execution time: %.0f ticks\n", (float)t1);
|
printf("execution time " _YELLOW_("%.2f") " sec\n", (float)t1 / 1000.0);
|
||||||
|
|
||||||
// clean up mutex
|
// clean up mutex
|
||||||
pthread_mutex_destroy(&print_lock);
|
pthread_mutex_destroy(&print_lock);
|
||||||
|
|||||||
Reference in New Issue
Block a user