patch 9.0.1116: compiler may complain about an unused function

Problem:    Compiler may complain about an unused function.
Solution:   Add #ifdef. (John Marriott)
diff --git a/src/term.c b/src/term.c
index 6410a57..e83c198 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1678,6 +1678,7 @@
 };
 #endif
 
+#if defined(HAVE_TGETENT) || defined(FEAT_TERMGUICOLORS)
 /*
  * Return TRUE if "term_strings[idx]" was not set.
  */
@@ -1686,6 +1687,7 @@
 {
     return TERM_STR(idx) == NULL || TERM_STR(idx) == empty_option;
 }
+#endif
 
 #ifdef HAVE_TGETENT
 /*