mkfontscale: Changes to 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Nov 13 20:25:26 UTC 2023


 constlist.c   |    8 +--
 hash.c        |   33 +++++---------
 ident.c       |   27 +++++-------
 mkfontscale.c |  130 +++++++++++++++++++++++++++-------------------------------
 4 files changed, 90 insertions(+), 108 deletions(-)

New commits:
commit b7ebb9b042974874782f4e662bfc442bc96c5647
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sat Nov 4 12:24:49 2023 -0700

    Fix -Wimplicit-float-conversion warnings from clang
    
    mkfontscale.c:110:32: warning: implicit conversion loses floating-point precision: 'double' to 'float' [-Wimplicit-float-conversion]
    static float bigEncodingFuzz = 0.02;
                 ~~~~~~~~~~~~~~~   ^~~~
    mkfontscale.c:262:52: warning: implicit conversion loses floating-point precision: 'double' to 'float' [-Wimplicit-float-conversion]
                bigEncodingFuzz = atof(argv[argn + 1]) / 100.0;
                                ~ ~~~~~~~~~~~~~~~~~~~~~^~~~~~~
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>

commit 3bc4d05ff753c1b8357455a614bc5d11fffcfc0e
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sat Nov 4 12:21:16 2023 -0700

    Resolve some -Wsign-conversion warnings from clang
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>

commit 19137ec2f129f91ce3adb46218c86e1bf547e661
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sat Nov 4 11:28:44 2023 -0700

    Variable scope reductions as recommended by cppcheck
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>

commit ffd69eb38f153229f5033ef5cc789c0ab3704edd
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sat Nov 4 10:43:35 2023 -0700

    ident.c: clear -Wdeclaration-after-statement warning
    
    ident.c: In function ‘getInt32’:
    ident.c:228:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
      228 |     unsigned int u[4] = { c[0], c[1], c[2], c[3] };
          |     ^~~~~~~~
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>

commit 568f31aefd6e060779572c1fe593519714f0d50b
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sat Nov 4 10:39:54 2023 -0700

    mkfontscale.c: handle -Wshadow warnings from gcc
    
    mkfontscale.c: In function ‘doDirectory’:
    mkfontscale.c:810:66: warning: declaration of ‘encodingsToDo’ shadows a global declaration [-Wshadow]
      810 | doDirectory(const char *dirname_given, int numEncodings, ListPtr encodingsToDo)
          |                                                          ~~~~~~~~^~~~~~~~~~~~~
    mkfontscale.c:117:16: note: shadowed declaration is here
      117 | static ListPtr encodingsToDo;
          |                ^~~~~~~~~~~~~
    mkfontscale.c: In function ‘readEncodings’:
    mkfontscale.c:1353:23: warning: declaration of ‘encodings’ shadows a global declaration [-Wshadow]
     1353 | readEncodings(ListPtr encodings, char *dirname)
          |               ~~~~~~~~^~~~~~~~~
    mkfontscale.c:93:21: note: shadowed declaration is here
       93 | static ConstListPtr encodings, extra_encodings;
          |                     ^~~~~~~~~
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>

commit fa682decde0b4513f5ce6084df590107359158f5
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sat Nov 4 10:10:34 2023 -0700

    doDirectory: add missing check for malloc() returning NULL
    
    Resolves gcc analyzer warning:
    
    mkfontscale.c: In function ‘doDirectory’:
    mkfontscale.c:974:17: warning: use of possibly-NULL ‘s’ where non-null expected [CWE-690] [-Wanalyzer-possible-null-argument]
      974 |                 memcpy(s, xlfd_name, l - 11);
          |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>



More information about the xorg-commit mailing list