Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

various fixes #49

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

various fixes #49

wants to merge 4 commits into from

Commits on Jun 1, 2022

  1. fix function declarations

    The nocase_strcmp() and nocase_strncmp() functions are correctly returning
    an integer value, let the declarations match the definitions.
    sharkcz committed Jun 1, 2022
    Configuration menu
    Copy the full SHA
    ad753ad View commit details
    Browse the repository at this point in the history
  2. use memcpy for copying the filename

    fixes the following:
    
    In file included from /usr/include/string.h:519,
                     from coff.c:35:
    In function 'strncpy',
        inlined from 'stab_add_filename' at coff.c:890:3:
    /usr/include/bits/string_fortified.h:95:10: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
       95 |   return __builtin___strncpy_chk (__dest, __src, __len,
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       96 |                                   __glibc_objsize (__dest));
          |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~
    coff.c: In function 'stab_add_filename':
    coff.c:859:13: note: length computed here
      859 |         n = strlen(pName);
          |             ^~~~~~~~~~~~~
    sharkcz committed Jun 1, 2022
    Configuration menu
    Copy the full SHA
    5e8409e View commit details
    Browse the repository at this point in the history
  3. fix uninitialized variable in parser

    The temp variable is used incorrectly in the strncmp() calls, they should
    compare against the line variable.
    sharkcz committed Jun 1, 2022
    Configuration menu
    Copy the full SHA
    70dcb86 View commit details
    Browse the repository at this point in the history
  4. use override for CFLAGS

    Adding CDEFS to CFLAGS in Makefile needs an override directive to allow
    user supplied CFLAGS to be used.
    
    http://www.gnu.org/software/make/manual/make.html#Override-Directive
    sharkcz committed Jun 1, 2022
    Configuration menu
    Copy the full SHA
    c444e20 View commit details
    Browse the repository at this point in the history