Skip to content

Wrong command line argument handling in sample without_cpp11_thread_tests #48

@HerbertKoelman

Description

@HerbertKoelman

Thread number argument is at position 1 and not 0.

   int number_of_threads = 2;
    if ( argc > 0 ){
       number_of_threads = atoi(argv[1]);
    }

Therefore we must test that argc is exactly equal to 2 (argument 1 is the program name and is always there)

Metadata

Metadata

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions