summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2019-09-15 17:47:42 +0200
committerBoris Faure <billiob@gmail.com>2019-09-15 17:47:42 +0200
commit2c5bab7b8d5bdb3acb89f363d685b4b1e6ffd1d5 (patch)
tree60f3fd8f5fe9f4b33feb9b66a0a8882f2635f60e
parent259722a3f325972a38065583dbfd62e10ca7b300 (diff)
termptyext: get rid of "unused" warnings
+ abort on unknown test escape code
-rw-r--r--src/bin/termptyext.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/bin/termptyext.c b/src/bin/termptyext.c
index a0ca1b3..1c183b0 100644
--- a/src/bin/termptyext.c
+++ b/src/bin/termptyext.c
@@ -330,16 +330,22 @@ tytest_handle_escape_codes(Termpty *ty,
330 _handle_mouse_wheel(ty, buf + 1); 330 _handle_mouse_wheel(ty, buf + 1);
331 break; 331 break;
332 default: 332 default:
333 abort();
333 break; 334 break;
334 } 335 }
335} 336}
336#endif 337#endif
337 338
339#if defined(ENABLE_TESTS) || defined(ENABLE_TEST_UI)
340#define ARG_USED_FOR_TESTS
341#else
342#define ARG_USED_FOR_TESTS EINA_UNUSED
343#endif
338 344
339Eina_Bool 345Eina_Bool
340termpty_ext_handle(Termpty *ty, 346termpty_ext_handle(Termpty *ty ARG_USED_FOR_TESTS,
341 const Eina_Unicode *buf, 347 const Eina_Unicode *buf ARG_USED_FOR_TESTS,
342 size_t blen) 348 size_t blen EINA_UNUSED)
343{ 349{
344 switch (buf[0]) // major opcode 350 switch (buf[0]) // major opcode
345 { 351 {
@@ -354,3 +360,4 @@ termpty_ext_handle(Termpty *ty,
354 } 360 }
355 return EINA_FALSE; 361 return EINA_FALSE;
356} 362}
363#undef ARG_USED_FOR_TESTS