Project

General

Profile

Actions

Bug #7647

open

../../common/syscall/psecflags.c has build issues

Added by Igor Kozhukhov about 7 years ago. Updated 8 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
kernel
Start date:
2016-12-05
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

if disable hides of gcc warning in unix/genunix we can see build issues:

../../common/syscall/psecflags.c: In function 'psecdo':
../../common/syscall/psecflags.c:67:2: error: enumeration value 'PSF_EFFECTIVE' not handled in switch [-Werror=switch]
  switch (args->which) {
  ^
../../common/syscall/psecflags.c:79:2: error: 'set' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  secflags_apply_delta(set, args->delta);
  ^
cc1: all warnings being treated as errors
*** Error code 1
dmake: Fatal error: Command failed for target `debug64/psecflags.o'
Current working directory /ws/builds/igork/dilos-illumos.git/usr/src/uts/sun4v/genunix
Actions #1

Updated by Igor Kozhukhov about 7 years ago

one way fix it by:

igork@bld13:~/builds/igork/dilos-illumos.git$ g diff usr/src/uts/common/syscall/psecflags.c
diff --git a/usr/src/uts/common/syscall/psecflags.c b/usr/src/uts/common/syscall/psecflags.c
index 08d923e..37612b5 100644
--- a/usr/src/uts/common/syscall/psecflags.c
+++ b/usr/src/uts/common/syscall/psecflags.c
@@ -44,7 +44,7 @@ secflags_apply_delta(secflagset_t *set, const secflagdelta_t *delta)
 static int
 psecdo(proc_t *p, struct psdargs *args)
 {
-       secflagset_t *set;
+       secflagset_t *set = NULL;
        int ret = 0;

        mutex_enter(&p->p_lock);
@@ -74,6 +74,8 @@ psecdo(proc_t *p, struct psdargs *args)
        case PSF_UPPER:
                set = &p->p_secflags.psf_upper;
                break;
+       default:
+               break;
        }

        secflags_apply_delta(set, args->delta);
Actions #2

Updated by Rich Lowe 8 months ago

  • Assignee deleted (Rich Lowe)
Actions

Also available in: Atom PDF