Compare commits

..

No commits in common. "bleeding" and "coverity_scan" have entirely different histories.

5 changed files with 6 additions and 15 deletions

View file

@ -39,10 +39,6 @@ identifier format.
``Type`` is the compound type of the generated array. ``params`` and ``nb_params``
are the pointer and the length of the generated array, respectively.
.. note::
The parameter array must be reachable after the function returns -- as
such, local arrays must be declared with `static` or dynamically allocated.
Passing multiple parameters
---------------------------
@ -61,7 +57,7 @@ easily use a struct to hold the context as a workaround:
};
ParameterizedTestParameters(suite_name, test_name) {
static struct my_params params[] = {
struct my_params params[] = {
// parameter set
};
@ -78,7 +74,7 @@ C++ users can also use a simpler syntax before returning an array of parameters:
.. code-block:: c++
ParameterizedTestParameters(suite_name, test_name) {
static struct my_params params[] = {
struct my_params params[] = {
// parameter set
};

View file

@ -17,6 +17,4 @@
# define PACKAGE "${PROJECT_NAME}"
# define VERSION "${PROJECT_VERSION}"
#define NN_SOCKET_PATH "/var/lib/"
#endif /* !CONFIG_H_IN_ */

View file

@ -323,8 +323,8 @@ static int criterion_run_all_tests_impl(struct criterion_test_set *set)
_(msg_valgrind_jobs), CR_FG_BOLD, CR_RESET);
}
char url[sizeof ("ipc://" NN_SOCKET_PATH "criterion_.sock") + 21];
snprintf(url, sizeof (url), "ipc://" NN_SOCKET_PATH "criterion_%llu.sock", get_process_id());
char url[sizeof ("ipc://criterion_.sock") + 21];
snprintf(url, sizeof (url), "ipc://criterion_%llu.sock", get_process_id());
int sock = cri_proto_bind(url);
if (sock < 0)

View file

@ -85,7 +85,6 @@ struct criterion_theory_context *cr_theory_init(void)
void cr_theory_free(struct criterion_theory_context *ctx)
{
dcFree(ctx->vm);
free(ctx);
}
static jmp_buf theory_jmp;

View file

@ -295,15 +295,13 @@ CR_API int criterion_handle_args(int argc, char *argv[],
switch (c) {
case 'b': criterion_options.logging_threshold = (enum criterion_logging_level) atou(DEF(optarg, "1")); break;
case 'y': criterion_options.always_succeed = true; break;
case 'z': fprintf(stderr, "--no-early-exit is now deprecated as it no longer does anything.\n"); break;
case 'z': fprintf(stderr, "--no-early-exit is now deprecated as it no longer does anything.\n");
case 'k': criterion_options.use_ascii = true; break;
case 'j': criterion_options.jobs = atou(optarg); break;
case 'f': criterion_options.fail_fast = true; break;
case 'S': criterion_options.short_filename = true; break;
case 'p':
fprintf(stderr, "--pattern has been renamed as --filter and is now deprecated.\n");
/* fallthrough */
case 'p': fprintf(stderr, "--pattern has been renamed as --filter and is now deprecated.\n");
case 'F': criterion_options.pattern = optarg; break;
case 'q': quiet = true; break;