Changeset 10e56b7 in mainline


Ignore:
Timestamp:
2023-07-14T12:41:26Z (11 months ago)
Author:
Vojtech Horky <vojtech.horky@…>
Branches:
ticket/834-toolchain-update
Children:
f1e7599
Parents:
c4c90c8
git-author:
Vojtech Horky <vojtech.horky@…> (2023-07-14 09:54:21)
git-committer:
Vojtech Horky <vojtech.horky@…> (2023-07-14 12:41:26)
Message:

Bypass compiler false-alarm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/rtld/symbol.c

    rc4c90c8 r10e56b7  
    135135        modules_untag(start->rtld);
    136136
    137         /* Insert root (the program) into the queue and tag it */
     137        /*
     138         * Insert root (the program) into the queue and tag it.
     139         *
     140         * We disable the dangling-pointer warning because the compiler incorrectly
     141         * assumes that we leak local address (queue) to a parent scope (to start
     142         * argument). However, we always empty the list so the pointer cannot
     143         * actually escape. Probably the compiler can never statically analyze that
     144         * correctly.
     145         */
    138146        list_initialize(&queue);
    139147        start->bfs_tag = true;
     148#pragma GCC diagnostic push
     149#pragma GCC diagnostic ignored "-Wdangling-pointer"
    140150        list_append(&start->queue_link, &queue);
     151#pragma GCC diagnostic pop
    141152
    142153        /* If the symbol is found, it will be stored in 'sym' */
Note: See TracChangeset for help on using the changeset viewer.