Skip to content
Snippets Groups Projects
Select Git revision
  • todo
  • master default
  • maint
  • pu
  • next
  • v2.21.0
  • v2.21.0-rc2
  • v2.21.0-rc1
  • v2.21.0-rc0
  • v2.20.1
  • v2.20.0
  • v2.20.0-rc2
  • v2.20.0-rc1
  • v2.19.2
  • v2.20.0-rc0
  • v2.19.1
  • v2.18.1
  • v2.17.2
  • v2.16.5
  • v2.15.3
  • v2.14.5
  • v2.19.0
  • v2.19.0-rc2
  • v2.19.0-rc1
  • v2.19.0-rc0
25 results

Makefile

  • Ramsay Jones's avatar
    54360a19
    Makefile: suppress a sparse warning for pack-revindex.c · 54360a19
    Ramsay Jones authored
    
    Sparse has, for a long time, been issuing the following warning against
    the pack-revindex.c file:
    
          SP pack-revindex.c
      pack-revindex.c:64:23: warning: memset with byte count of 262144
    
    This results from a unconditional check, with a hard-coded limit, which
    is really only appropriate for the kernel source code. (The check is for
    a 'large' byte count in a call to memcpy(), memset(), copy_from_user()
    and copy_to_user() functions).
    
    A recent release of sparse (v0.5.1) has introduced some options to allow
    this check to be turned off (-Wno-memcpy-max-count) or to specify the
    actual limit used (-fmemcpy-max-count=COUNT), rather than a hard-coded
    limit of 100000.
    
    In order to suppress the warning, add a target for pack-revindex.sp that
    adds the '-Wno-memcpy-max-count' option to the SPARSE_FLAGS variable.
    
    Signed-off-by: default avatarRamsay Jones <ramsay@ramsayjones.plus.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    54360a19
    History
    Makefile: suppress a sparse warning for pack-revindex.c
    Ramsay Jones authored
    
    Sparse has, for a long time, been issuing the following warning against
    the pack-revindex.c file:
    
          SP pack-revindex.c
      pack-revindex.c:64:23: warning: memset with byte count of 262144
    
    This results from a unconditional check, with a hard-coded limit, which
    is really only appropriate for the kernel source code. (The check is for
    a 'large' byte count in a call to memcpy(), memset(), copy_from_user()
    and copy_to_user() functions).
    
    A recent release of sparse (v0.5.1) has introduced some options to allow
    this check to be turned off (-Wno-memcpy-max-count) or to specify the
    actual limit used (-fmemcpy-max-count=COUNT), rather than a hard-coded
    limit of 100000.
    
    In order to suppress the warning, add a target for pack-revindex.sp that
    adds the '-Wno-memcpy-max-count' option to the SPARSE_FLAGS variable.
    
    Signed-off-by: default avatarRamsay Jones <ramsay@ramsayjones.plus.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>