summaryrefslogtreecommitdiff
path: root/src/tc-list.c
diff options
context:
space:
mode:
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)