summaryrefslogtreecommitdiff
path: root/src/tc-list.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2022-10-24 21:03:43 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2022-10-24 21:03:43 +0200
commitaab49e5a013c53ae812a143fe41add74e0677a61 (patch)
treef0c6e1ba7db9991f2bd38c9169f9921bfe5e61d8 /src/tc-list.c
parentdf5167db909a88fb8e16dd20b37442495a6ac059 (diff)
parent532d4a24e2013262dfa41fd85c06a9715c99abf7 (diff)
Update upstream source from tag 'upstream/4.7'
Update to upstream version '4.7' with Debian dir d3e11463c915e5c39507206197eb3acd42bb8f5f
Diffstat (limited to 'src/tc-list.c')
-rw-r--r--src/tc-list.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tc-list.c b/src/tc-list.c
index c30f5aa..751f462 100644
--- a/src/tc-list.c
+++ b/src/tc-list.c
@@ -39,6 +39,8 @@ static void l_init(unsigned int max, bool unshift)
obj = new struct text_object;
#else
obj = malloc(sizeof(*obj));
+ if (obj == NULL)
+ abort();
#endif
HXlist_init(&obj->list);
obj->id[0] = HX_irand('a', 'z'+1);
@@ -111,6 +113,8 @@ static void l_empty(void)
static void l_shift(void)
{
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
/* Check for -Wshadow warnings */
struct object {
int value;
@@ -130,6 +134,7 @@ static void l_shift(void)
HXclist_push(&clh, &q.anchor);
x = p = HXclist_pop(&clh, struct object, anchor);
printf("%d\n", p->value);
+#pragma GCC diagnostic pop
}
int main(int argc, const char **argv)