1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
Description: Fix some gcc 4.8 warnings:
There is UB, so disable aggressive loop optimizations.
Disable some nosy warnings.
Make sure local vars are initialized.
Index: uts/usr/src/uts/Makefile.uts
===================================================================
--- uts.orig/usr/src/uts/Makefile.uts 2014-04-23 22:33:30.990872931 +0400
+++ uts/usr/src/uts/Makefile.uts 2014-04-24 17:15:21.832067305 +0400
@@ -225,6 +225,8 @@
CERRWARN += -_gcc=-Wno-unknown-pragmas
CERRWARN += -_gcc=-Wno-unused-parameter
CERRWARN += -_gcc=-Wno-missing-field-initializers
+CERRWARN += -_gcc=-Wno-format-security
+CERRWARN += -_gcc=-Wno-unused-but-set-parameter
# DEBUG v. -nd make for frequent unused variables, empty conditions, etc. in
# -nd builds
@@ -245,6 +247,7 @@
CFLAGS_uts += $(EXTRA_CFLAGS)
CFLAGS_uts += $(CSOURCEDEBUGFLAGS)
CFLAGS_uts += $(CUSERFLAGS)
+CFLAGS_uts += -_gcc=-fno-aggressive-loop-optimizations
#
# Declare that $(OBJECTS) and $(LINTS) can be compiled in parallel.
Index: uts/usr/src/uts/common/io/fibre-channel/ulp/fcip.c
===================================================================
--- uts.orig/usr/src/uts/common/io/fibre-channel/ulp/fcip.c 2014-04-24 17:10:07.631149096 +0400
+++ uts/usr/src/uts/common/io/fibre-channel/ulp/fcip.c 2014-04-24 22:31:53.979112348 +0400
@@ -4691,6 +4691,10 @@
tnf_string, msg, "enter"));
mutex_enter(&fptr->fcip_mutex);
+ fptr->fcip_ub_nbufs = fcip_ub_nbufs;
+ /* Fix gcc 4.8 warning: tok_buf_size maybe uninitialized. */
+ tok_buf_size = sizeof (*fptr->fcip_ub_tokens) * fcip_ub_nbufs;
+
/*
* setup mac address for this port. Don't be too worried if
* the WWN is zero, there is probably nothing attached to
@@ -4717,8 +4721,6 @@
/*
* Allocate unsolicited buffers
*/
- fptr->fcip_ub_nbufs = fcip_ub_nbufs;
- tok_buf_size = sizeof (*fptr->fcip_ub_tokens) * fcip_ub_nbufs;
FCIP_TNF_PROBE_2((fcip_init_port, "fcip io", /* CSTYLED */,
tnf_string, msg, "debug",
Index: uts/usr/src/uts/common/io/hotplug/pcihp/pcihp.c
===================================================================
--- uts.orig/usr/src/uts/common/io/hotplug/pcihp/pcihp.c 2014-03-01 16:18:30.000000000 +0400
+++ uts/usr/src/uts/common/io/hotplug/pcihp/pcihp.c 2014-04-24 23:21:46.494253046 +0400
@@ -3205,7 +3205,8 @@
int kmflag)
{
struct pcihp_slotinfo *slotinfop;
- int pci_dev, rc, event_serviced = 0;
+ int pci_dev, event_serviced = 0;
+ int rc = 0;
/*
* Handle ENUM# condition for the "favorite" slot first.
|