Changeset 426b6cd in rtems for cpukit/libtest/t-test.c


Ignore:
Timestamp:
01/27/21 15:41:00 (18 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
e269e389
Parents:
361ec320
git-author:
Sebastian Huber <sebastian.huber@…> (01/27/21 15:41:00)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/27/21 18:08:29)
Message:

libtest: Use dependency injection

This helps static analyzers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libtest/t-test.c

    r361ec320 r426b6cd  
    10031003}
    10041004
     1005static void T_do_pop_fixture(T_context *);
     1006
    10051007static void
    10061008T_do_case_end(T_context *ctx, const T_case_context *tc)
     
    10141016
    10151017        while (ctx->fixtures != NULL) {
    1016                 T_pop_fixture();
     1018                T_do_pop_fixture(ctx);
    10171019        }
    10181020
     
    12381240}
    12391241
    1240 void
    1241 T_pop_fixture(void)
    1242 {
    1243         T_context *ctx;
     1242static void
     1243T_do_pop_fixture(T_context *ctx)
     1244{
    12441245        T_fixture_node *node;
    12451246        const T_fixture *fixture;
    12461247        T_fixture_node *next;
    12471248
    1248         ctx = &T_instance;
    12491249        node = ctx->fixtures;
    12501250        next = node->next;
     
    12751275}
    12761276
     1277void
     1278T_pop_fixture(void)
     1279{
     1280        T_do_pop_fixture(&T_instance);
     1281}
     1282
    12771283size_t
    12781284T_get_scope(const char * const * const *desc, char *buf, size_t n,
Note: See TracChangeset for help on using the changeset viewer.