Check snprintf return value
Check snprintf return value

When possibility of truncating is expected or we are sure it will never
happen, we should check the return value. If the return value is checked
and program is branched, the GCC warning is not issued.
See https://bugzilla.redhat.com/show_bug.cgi?id=1431678#c3

Addressing:

/home/jcerny/openscap/utils/oscap-info.c: In function ‘app_info’:
/home/jcerny/openscap/utils/oscap-info.c:90:46: warning: ‘-’ directive output may be truncated writing 1 byte into a region of size between 0 and 7 [-Wformat-truncation=]
   90 |    snprintf(date_str, sizeof(date_str), "%04d-%02d-%02d", date->tm_year + 1900, date->tm_mon + 1, date->tm_mday);
      |                                              ^
/home/jcerny/openscap/utils/oscap-info.c:90:41: note: directive argument in the range [-2147483647, 2147483647]
   90 |    snprintf(date_str, sizeof(date_str), "%04d-%02d-%02d", date->tm_year + 1900, date->tm_mon + 1, date->tm_mday);
      |                                         ^~~~~~~~~~~~~~~~
/home/jcerny/openscap/utils/oscap-info.c:90:4: note: ‘snprintf’ output between 11 and 36 bytes into a destination of size 11
   90 |    snprintf(date_str, sizeof(date_str), "%04d-%02d-%02d", date->tm_year + 1900, date->tm_mon + 1, date->tm_mday);
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘_print_xccdf_tailoring_header’,
    inlined from ‘_print_xccdf_tailoring’ at /home/jcerny/openscap/utils/oscap-info.c:276:2,
    inlined from ‘app_info_single_ds_profiles_only’ at /home/jcerny/openscap/utils/oscap-info.c:333:4,
    inlined from ‘app_info_single_ds’ at /home/jcerny/openscap/utils/oscap-info.c:510:18,
    inlined from ‘app_info_sds’ at /home/jcerny/openscap/utils/oscap-info.c:542:7,
    inlined from ‘app_info’ at /home/jcerny/openscap/utils/oscap-info.c:654:7:
/home/jcerny/openscap/utils/oscap-info.c:270:2: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
  270 |  printf("%sBenchmark Hint: %s\n", prefix, xccdf_tailoring_get_benchmark_ref(tailoring));
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jcerny/openscap/utils/oscap-info.c: In function ‘app_info’:
/home/jcerny/openscap/utils/oscap-info.c:90:46: warning: ‘-’ directive output may be truncated writing 1 byte into a region of size between 0 and 7 [-Wformat-truncation=]
   90 |    snprintf(date_str, sizeof(date_str), "%04d-%02d-%02d", date->tm_year + 1900, date->tm_mon + 1, date->tm_mday);
      |                                              ^
/home/jcerny/openscap/utils/oscap-info.c:90:41: note: directive argument in the range [-2147483647, 2147483647]
   90 |    snprintf(date_str, sizeof(date_str), "%04d-%02d-%02d", date->tm_year + 1900, date->tm_mon + 1, date->tm_mday);
      |                                         ^~~~~~~~~~~~~~~~
/home/jcerny/openscap/utils/oscap-info.c:90:4: note: ‘snprintf’ output between 11 and 36 bytes into a destination of size 11
   90 |    snprintf(date_str, sizeof(date_str), "%04d-%02d-%02d", date->tm_year + 1900, date->tm_mon + 1, date->tm_mday);
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

OpenSCAP/openscap,redhatrises/openscap,redhatrises/openscap,OpenSCAP/openscap,redhatrises/openscap,OpenSCAP/openscap,redhatrises/openscap,redhatrises/openscap,OpenSCAP/openscap,redhatrises/openscap,OpenSCAP/openscap,OpenSCAP/openscap