10165 libzpool: passing argument 1 to restrict-qualified parameter aliases with argument 4

Review Request #1335 — Created Dec. 25, 2018 and submitted

tsoome
illumos-gate
10165
2e55908...
general
../../../uts/common/fs/zfs/dsl_dataset.c: In function 'dsl_get_mountpoint':
../../../uts/common/fs/zfs/dsl_dataset.c:2186:3: error: passing argument 1 to re
strict-qualified parameter aliases with argument 4 [-Werror=restrict]
   (void) snprintf(value, ZAP_MAXVALUELEN, "%s", value);
   ^
cc1: all warnings being treated as errors


  • 0
  • 0
  • 2
  • 0
  • 2
Description From Last Updated
domag02
  1. A better solution from ZFS on Linux.
    Commit:
    OpenZFS 7431 - ZFS Channel Programs

  2. usr/src/uts/common/fs/zfs/dsl_dataset.c (Diff revision 1)
     
     

    If you remove else, them please update this comment line.
    See here: ZFS on Linux, /module/zfs/dsl_dataset.c: line 2381

  3. usr/src/uts/common/fs/zfs/dsl_dataset.c (Diff revision 1)
     
     

    It would be better to remove the whole else arm, see here:
    ZFS on Linux, /module/zfs/dsl_dataset.c: line 2433

  4. 
      
avgapon
  1. 
      
  2. usr/src/uts/common/fs/zfs/dsl_dataset.c (Diff revision 1)
     
     
    value[ZAP_MAXVALUELEN - 1] = '\0' ?
    1. As pointed above, it seems we really do not need this construct here at all.

  3. 
      
tsoome
domag02
  1. Ship It!
  2. 
      
jlevon
  1. Ship It!
  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...