Bug 2259617 - gettext build warnings
Summary: gettext build warnings
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gettext
Version: 40
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Manish Tiwari
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-01-22 12:39 UTC by Manish Tiwari
Modified: 2025-01-21 08:21 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-01-21 08:21:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Manish Tiwari 2024-01-22 12:39:25 UTC
1.RPM build warnings:
    line 153: Possible unexpanded macro in: Requires: emacs(bin) >= %{_emacs_version}
2.logs:
./libgettextpo/textstyle.h:144:3: warning: use of possibly-NULL 'string_3(D)' where non-null expected [CWE-690] [-Wanalyzer-possible-null-argument]
  144 |   ostream_write_mem (stream, string, strlen (string));
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  'msgdomain_list_print_stringtable': events 1-2
    |
    |write-stringtable.c:312:1:
    |  312 | msgdomain_list_print_stringtable (msgdomain_list_ty *mdlp, ostream_t stream,
    |      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    |      | |
    |      | (1) entry to 'msgdomain_list_print_stringtable'
    |......
    |  321 |   write_stringtable (stream, mlp, mdlp->encoding, page_width, debug);
    |      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    |      |   |
    |      |   (2) calling 'write_stringtable' from 'msgdomain_list_print_stringtable'
    |
    +--> 'write_stringtable': events 3-10
           |
           |  279 | write_stringtable (ostream_t stream, message_list_ty *mlp,
           |      | ^~~~~~~~~~~~~~~~~
           |      | |
           |      | (3) entry to 'write_stringtable'
           |......
           |  294 |   for (j = 0; j < mlp->nitems; ++j)
           |      |               ~~~~~~~~~~~~~~~
           |      |                 |
           |      |                 (4) following 'true' branch...
           |  295 |     {
           |  296 |       const message_ty *mp = mlp->item[j];
           |      |       ~~~~~
           |      |       |
           |      |       (5) ...to here
           |  297 | 
           |  298 |       if (mp->msgid_plural == NULL)
           |      |          ~
           |      |          |
           |      |          (6) following 'true' branch...
           |  299 |         {
           |  300 |           if (blank_line)
           |      |           ~~ ~
           |      |           |  |
           |      |           |  (8) following 'false' branch (when 'blank_line_10 == 0')...
           |      |           (7) ...to here
           |......
           |  303 |           write_message (stream, mp, page_width, debug);
           |      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           |      |           |
           |      |           (9) ...to here
           |      |           (10) calling 'write_message' from 'write_stringtable'
           |
           +--> 'write_message': events 11-12
                  |
                  |   97 | write_message (ostream_t stream, const message_ty *mp,
                  |      | ^~~~~~~~~~~~~
                  |      | |
                  |      | (11) entry to 'write_message'
                  |......
                  |  191 |   if (mp->filepos_count != 0)
                  |      |      ~
                  |      |      |
                  |      |      (12) following 'true' branch...
                  |
                'write_message': event 13
                  |
                  |cc1:
                  | (13): ...to here
                  |
                'write_message': events 14-17
                  |
                  |  195 |       for (j = 0; j < mp->filepos_count; ++j)
                  |      |                   ~~^~~~~~~~~~~~~~~~~~~
                  |      |                     |
                  |      |                     (14) following 'true' branch...
                  |  196 |         {
                  |  197 |           lex_pos_ty *pp = &mp->filepos[j];
                  |      |           ~~~~~~~~~~ 
                  |      |           |
                  |      |           (15) ...to here
                  |......
                  |  203 |           str = xasprintf ("/* File: %s:%ld */\n", cp, (long) pp->line_number);
                  |      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                  |      |                 |
                  |      |                 (16) this call could return NULL
                  |  204 |           ostream_write_str (stream, str);
                  |      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                  |      |           |
                  |      |           (17) calling 'ostream_write_str' from 'write_message'
                  |
                  +--> 'ostream_write_str': events 18-19
                         |
                         |../libgettextpo/textstyle.h:142:1:
                         |  142 | ostream_write_str (ostream_t stream, const char *string)
                         |      | ^~~~~~~~~~~~~~~~~
                         |      | |
                         |      | (18) entry to 'ostream_write_str'
                         |  143 | {
                         |  144 |   ostream_write_mem (stream, string, strlen (string));
                         |      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                         |      |   |
                         |      |   (19) argument 1 ('string_3(D)') from (16) could be NULL where non-null expected
                         |
In file included from ../libgettextpo/string.h:31,
                 from ../gnulib-lib/string.h:41,
                 from ../libgettextpo/textstyle.h:44:
/usr/include/string.h:407:15: note: argument 1 of 'strlen' must be non-null
  407 | extern size_t strlen (const char *__s)
      |               ^~~~~~
make[5]: Entering directory '/builddir/build/BUILD/gettext-0.22/gettext-tools/src'
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DLOCALEDIR=\"/usr/share/locale\" -DBISON_LOCALEDIR=\"/usr/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/share/locale\" -DUSEJAVA=0 -DGETTEXTJAR=\"/usr/share/gettext/gettext.jar\" -DLIBDIR=\"/usr/lib64\" -DGETTEXTDATADIR=\"/usr/share/gettext\" -DPROJECTSDIR=\"/usr/share/gettext/projects\" -DEXEEXT=\"\" -DHAVE_CONFIG_H -I. -I..  -I. -I. -I.. -I.. -I../libgrep -I../gnulib-lib -I../gnulib-lib -I../../gettext-runtime/intl -I../../gettext-runtime/intl -I../libgettextpo -I../libgettextpo   -I/usr/include/libxml2 -fanalyzer -fstrict-flex-arrays -Wall -Warith-conversion -Wcast-align=strict -Wdate-time -Wdisabled-optimization -Wdouble-promotion -Wduplicated-branches -Wduplicated-cond -Wextra -Wformat-signedness -Winit-self -Winvalid-pch -Wlogical-op -Wmissing-include-dirs -Wnested-externs -Wnull-dereference -Wopenmp-simd -Woverlength-strings -Wpacked -Wpointer-arith -Wstack-protector -Wstrict-flex-arrays -Wstrict-overflow -Wsuggest-attribute=format -Wsuggest-final-methods -Wsuggest-final-types -Wsync-nand -Wsystem-headers -Wtrampolines -Wuninitialized -Wunknown-pragmas -Wunsafe-loop-optimizations -Wvariadic-macros -Wvector-operation-performance -Wwrite-strings -Warray-bounds=2 -Wattribute-alias=2 -Wbidi-chars=any,ucn -Wformat-overflow=2 -Wformat=2 -Wformat-truncation=2 -Wimplicit-fallthrough=5 -Wshift-overflow=2 -Wuse-after-free=3 -Wunused-const-variable=2 -Wvla-larger-than=4031 -Wno-analyzer-malloc-leak -Wno-empty-body -Wno-analyzer-double-fclose -Wno-analyzer-double-free -Wno-analyzer-fd-double-close -Wno-analyzer-null-argument -Wno-analyzer-null-dereference -Wno-analyzer-use-of-uninitialized-value -Wno-cast-align -Wno-format-nonliteral -Wno-sign-compare -Wno-type-limits -Wno-unused-parameter -Wno-clobbered -Wshadow=local -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64   -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer  -c -o libgettextsrc_la-write-po.lo `test -f 'write-po.c' || echo './'`write-po.c

Reproducible: Always

Steps to Reproduce:
1.clone gettext
2.mockbuild
3.

Comment 1 Aoife Moloney 2024-02-15 23:11:39 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle.
Changing version to 40.


Note You need to log in before you can comment on or make changes to this bug.