diff options
author | John Levon <john.levon@joyent.com> | 2018-10-04 14:16:36 +0000 |
---|---|---|
committer | John Levon <john.levon@joyent.com> | 2018-10-04 14:17:27 +0000 |
commit | ee4c7a44cc40ef09d84ad16a742b124f3122fea2 (patch) | |
tree | 8795f1830a80acaddb0c0198d5d21587bee6781e | |
parent | ccdb3132be8134de6b5411bd214acdf0f702cca3 (diff) | |
download | illumos-joyent-ee4c7a44cc40ef09d84ad16a742b124f3122fea2.tar.gz |
OS-7276 various illumos fixes needed for newer GCC versions
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Approved by: Jerry Jelinek <jerry.jelinek@joyent.com>
-rw-r--r-- | usr/src/Makefile.lint | 1 | ||||
-rw-r--r-- | usr/src/cmd/column/Makefile | 37 | ||||
-rw-r--r-- | usr/src/cmd/column/column.c | 8 | ||||
-rw-r--r-- | usr/src/lib/libctf/common/ctf_dwarf.c | 7 | ||||
-rw-r--r-- | usr/src/lib/libzdoor/common/zdoor.c | 20 | ||||
-rw-r--r-- | usr/src/uts/Makefile.uts | 9 | ||||
-rw-r--r-- | usr/src/uts/common/inet/udp/udp.c | 6 | ||||
-rw-r--r-- | usr/src/uts/common/io/dr_sas/dr_sas.c | 36 | ||||
-rw-r--r-- | usr/src/uts/intel/io/vmxnet/vmxnet.c | 6 |
9 files changed, 55 insertions, 75 deletions
diff --git a/usr/src/Makefile.lint b/usr/src/Makefile.lint index 85feac38e1..da55853bba 100644 --- a/usr/src/Makefile.lint +++ b/usr/src/Makefile.lint @@ -88,6 +88,7 @@ COMMON_SUBDIRS = \ cmd/cmd-inet/usr.sbin/nwamadm \ cmd/cmd-inet/usr.sbin/nwamcfg \ cmd/col \ + cmd/column \ cmd/compress \ cmd/consadm \ cmd/coreadm \ diff --git a/usr/src/cmd/column/Makefile b/usr/src/cmd/column/Makefile index ab4cf3390e..b9b395b384 100644 --- a/usr/src/cmd/column/Makefile +++ b/usr/src/cmd/column/Makefile @@ -1,42 +1,33 @@ # -# CDDL HEADER START +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. # -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. # -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright (c) 2013 Joyent, Inc. All rights reserved. -# Use is subject to license terms. +# Copyright 2018 Joyent, Inc. # PROG=column +OBJS=column.o include ../Makefile.cmd -CFLAGS += $(CCVERBOSE) - .KEEP_STATE: all: $(PROG) +$(PROG): $(OBJS) + $(LINK.c) -o $@ $(OBJS) $(LDLIBS) + $(POST_PROCESS) + install: all $(ROOTPROG) clean: + $(RM) $(OBJS) lint: lint_PROG diff --git a/usr/src/cmd/column/column.c b/usr/src/cmd/column/column.c index 4f9a3c81a6..5c76cb8751 100644 --- a/usr/src/cmd/column/column.c +++ b/usr/src/cmd/column/column.c @@ -27,15 +27,9 @@ * SUCH DAMAGE. */ /* - * Portions Copyright (c) 2013 Joyent, Inc. All rights reserved. + * Portions Copyright 2018 Joyent, Inc. */ -#ifndef lint -static const char copyright[] = -"@(#) Copyright (c) 1989, 1993, 1994\n\ - The Regents of the University of California. All rights reserved.\n"; -#endif - #include <sys/types.h> #include <sys/ioctl.h> #include <sys/param.h> diff --git a/usr/src/lib/libctf/common/ctf_dwarf.c b/usr/src/lib/libctf/common/ctf_dwarf.c index 811a55bc64..13a049d243 100644 --- a/usr/src/lib/libctf/common/ctf_dwarf.c +++ b/usr/src/lib/libctf/common/ctf_dwarf.c @@ -28,7 +28,7 @@ */ /* - * Copyright 2015 Joyent, Inc. + * Copyright 2018 Joyent, Inc. */ /* @@ -225,7 +225,7 @@ typedef struct ctf_dwmap { typedef struct ctf_dwvar { ctf_list_t cdv_list; - char *cdv_name; + char *cdv_name; ctf_id_t cdv_type; boolean_t cdv_global; } ctf_dwvar_t; @@ -1445,7 +1445,6 @@ ctf_dwarf_create_array(ctf_die_t *cdp, Dwarf_Die die, ctf_id_t *idp, int isroot) Dwarf_Die tdie, rdie; ctf_id_t tid; Dwarf_Half rtag; - ctf_arinfo_t ar; if ((ret = ctf_dwarf_refdie(cdp, die, DW_AT_type, &tdie)) != 0) return (ret); @@ -1453,8 +1452,6 @@ ctf_dwarf_create_array(ctf_die_t *cdp, Dwarf_Die die, ctf_id_t *idp, int isroot) CTF_ADD_NONROOT)) != 0) return (ret); - ar.ctr_contents = tid; - if ((ret = ctf_dwarf_child(cdp, die, &rdie)) != 0) return (ret); if ((ret = ctf_dwarf_tag(cdp, rdie, &rtag)) != 0) diff --git a/usr/src/lib/libzdoor/common/zdoor.c b/usr/src/lib/libzdoor/common/zdoor.c index f2996b4e2d..d04e7ccb0f 100644 --- a/usr/src/lib/libzdoor/common/zdoor.c +++ b/usr/src/lib/libzdoor/common/zdoor.c @@ -19,12 +19,9 @@ * CDDL HEADER END */ /* - * Copyright 2011 Joyent, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright 2018 Joyent, Inc. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <alloca.h> #include <door.h> #include <errno.h> @@ -47,8 +44,8 @@ extern void * zonecfg_notify_bind(int(*func)(const char *zonename, zoneid_t zid, - const char *newstate, const char *oldstate, - hrtime_t when, void *p), void *p); + const char *newstate, const char *oldstate, hrtime_t when, + void *p), void *p); extern void zonecfg_notify_unbind(void *handle); @@ -69,7 +66,7 @@ zonecfg_notify_unbind(void *handle); */ static void _callback(void *cookie, char *argp, size_t arg_size, door_desc_t *dp, - uint_t n_desc) + uint_t n_desc) { zdoor_result_t *result = NULL; void *door_response = NULL; @@ -97,7 +94,7 @@ _callback(void *cookie, char *argp, size_t arg_size, door_desc_t *dp, if (door_response != NULL) { size = result->zdr_size; (void) memcpy(door_response, - (void *) result->zdr_data, size); + (void *) result->zdr_data, size); } } @@ -145,7 +142,6 @@ zdoor_create(dtree_entry_t *entry) { int status = ZDOOR_OK; zoneid_t zid = -1; - zdoor_handle_t handle = NULL; if (entry == NULL) { zdoor_debug("zdoor_create: NULL arguments"); @@ -155,8 +151,6 @@ zdoor_create(dtree_entry_t *entry) zdoor_debug("zdoor_create: entry=%p, zone=%s, service=%s", entry, entry->dte_parent->zte_zonename, entry->dte_service); - handle = entry->dte_parent->zte_parent; - zid = getzoneidbyname(entry->dte_parent->zte_zonename); if (zid < 0) { zdoor_info("zdoor_create: %s is a non-existient zone", @@ -225,7 +219,7 @@ zdoor_visitor(dtree_entry_t *entry) */ static int zone_monitor(const char *zonename, zoneid_t zid, const char *newstate, - const char *oldstate, hrtime_t when, void *p) + const char *oldstate, hrtime_t when, void *p) { zdoor_handle_t handle = (zdoor_handle_t)p; ztree_entry_t *entry = NULL; @@ -310,7 +304,7 @@ zdoor_handle_destroy(zdoor_handle_t handle) */ int zdoor_open(zdoor_handle_t handle, const char *zonename, const char *service, - void *biscuit, zdoor_callback callback) + void *biscuit, zdoor_callback callback) { zdoor_cookie_t *zdoor_cookie = NULL; int rc = -1; diff --git a/usr/src/uts/Makefile.uts b/usr/src/uts/Makefile.uts index 76cd9aef72..65bcf5b18b 100644 --- a/usr/src/uts/Makefile.uts +++ b/usr/src/uts/Makefile.uts @@ -24,7 +24,7 @@ # Copyright (c) 2011 Bayard G. Bell. All rights reserved. # Copyright (c) 2011 by Delphix. All rights reserved. # Copyright (c) 2013 Andrew Stormont. All rights reserved. -# Copyright 2015 Joyent, Inc. +# Copyright 2018 Joyent, Inc. # Copyright 2016 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> # @@ -44,7 +44,7 @@ include $(SRC)/Makefile.master DTEXTDOM = # -# Keep references to $(SRC)/common relative. +# Keep references to $(SRC)/common relative. COMMONBASE= $(UTSBASE)/../common # @@ -184,7 +184,7 @@ LINT_MODULE= $(MODULE) # # Build the compile/assemble lines: # -EXTRA_OPTIONS = +EXTRA_OPTIONS = AS_DEFS = -D_ASM -D__STDC__=0 ALWAYS_DEFS_32 = -D_KERNEL -D_SYSCALL32 -D_DDI_STRICT @@ -215,7 +215,6 @@ AS_CPPFLAGS = $(ALWAYS_DEFS) $(ALL_DEFS) $(CONFIG_DEFS) $(AS_DEFS) \ # Override the default, the kernel is squeaky clean CERRWARN = -errtags=yes -errwarn=%all -$(__GNUC4)CERRWARN += -_gcc=-Wno-address CERRWARN += -_gcc=-Wno-missing-braces CERRWARN += -_gcc=-Wno-sign-compare @@ -326,7 +325,7 @@ CTFMERGE_GUDIR_sparc = sun4u CTFMERGE_GUDIR_i386 = intel CTFMERGE_GUDIR = $(CTFMERGE_GUDIR_$(MACH)) -CTFMERGE_GENUNIX = \ +CTFMERGE_GENUNIX = \ $(UTSBASE)/$(CTFMERGE_GUDIR)/genunix/$(OBJS_DIR)/genunix # diff --git a/usr/src/uts/common/inet/udp/udp.c b/usr/src/uts/common/inet/udp/udp.c index a88bac932c..e12ab3d45d 100644 --- a/usr/src/uts/common/inet/udp/udp.c +++ b/usr/src/uts/common/inet/udp/udp.c @@ -22,7 +22,7 @@ * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2013 Nexenta Systems, Inc. All rights reserved. * Copyright 2014, OmniTI Computer Consulting, Inc. All rights reserved. - * Copyright 2015, Joyent, Inc. + * Copyright 2018, Joyent, Inc. */ /* Copyright (c) 1990 Mentat Inc. */ @@ -373,8 +373,6 @@ udp_srcport_hash(mblk_t *mp, int type, uint16_t min, uint16_t max, uint16_t def) { size_t szused = 0; - struct ether_header *ether; - struct ether_vlan_header *vether; ip6_t *ip6h; ipha_t *ipha; uint16_t sap; @@ -401,12 +399,10 @@ udp_srcport_hash(mblk_t *mp, int type, uint16_t min, uint16_t max, if (mp->b_cont == NULL) return (def); mp = mp->b_cont; - ether = (struct ether_header *)mp->b_rptr; } else if (MBLKL(mp) < VXLAN_HDR_LEN) { return (def); } else { szused = VXLAN_HDR_LEN; - ether = (struct ether_header *)((uintptr_t)mp->b_rptr + szused); } /* Can we hold a MAC header? */ diff --git a/usr/src/uts/common/io/dr_sas/dr_sas.c b/usr/src/uts/common/io/dr_sas/dr_sas.c index 5b1dc82938..02354c9b16 100644 --- a/usr/src/uts/common/io/dr_sas/dr_sas.c +++ b/usr/src/uts/common/io/dr_sas/dr_sas.c @@ -9,8 +9,8 @@ * Author: * Arun Chandrashekhar * Manju R - * Rajesh Prabhakaran - * Seokmann Ju + * Rajesh Prabhakaran + * Seokmann Ju * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -45,6 +45,10 @@ * Use is subject to license terms. */ +/* + * Copyright 2018 Joyent, Inc. + */ + #include <sys/types.h> #include <sys/param.h> #include <sys/file.h> @@ -80,7 +84,7 @@ * Local static data */ static void *drsas_state = NULL; -static int debug_level_g = CL_NONE; +static int debug_level_g = CL_NONE; #pragma weak scsi_hba_open #pragma weak scsi_hba_close @@ -251,7 +255,7 @@ drsas_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) uint8_t create_scsi_node_f = 0; uint8_t create_ioc_node_f = 0; uint8_t tran_alloc_f = 0; - uint8_t irq; + uint8_t irq; uint16_t vendor_id; uint16_t device_id; uint16_t subsysvid; @@ -1067,7 +1071,7 @@ drsas_reset(dev_info_t *dip, ddi_reset_cmd_t cmd) /*ARGSUSED*/ static int drsas_tran_tgt_init(dev_info_t *hba_dip, dev_info_t *tgt_dip, - scsi_hba_tran_t *tran, struct scsi_device *sd) + scsi_hba_tran_t *tran, struct scsi_device *sd) { struct drsas_instance *instance; uint16_t tgt = sd->sd_address.a_target; @@ -1171,8 +1175,8 @@ drsas_name_node(dev_info_t *dip, char *name, int len) static struct scsi_pkt * drsas_tran_init_pkt(struct scsi_address *ap, register struct scsi_pkt *pkt, - struct buf *bp, int cmdlen, int statuslen, int tgtlen, - int flags, int (*callback)(), caddr_t arg) + struct buf *bp, int cmdlen, int statuslen, int tgtlen, + int flags, int (*callback)(), caddr_t arg) { struct scsa_cmd *acmd; struct drsas_instance *instance; @@ -1243,7 +1247,7 @@ drsas_tran_init_pkt(struct scsi_address *ap, register struct scsi_pkt *pkt, static int drsas_tran_start(struct scsi_address *ap, register struct scsi_pkt *pkt) { - uchar_t cmd_done = 0; + uchar_t cmd_done = 0; struct drsas_instance *instance = ADDR2MR(ap); struct drsas_cmd *cmd; @@ -1639,7 +1643,7 @@ drsas_isr(struct drsas_instance *instance) static struct drsas_cmd * get_mfi_pkt(struct drsas_instance *instance) { - mlist_t *head = &instance->cmd_pool_list; + mlist_t *head = &instance->cmd_pool_list; struct drsas_cmd *cmd = NULL; mutex_enter(&instance->cmd_pool_mtx); @@ -3271,13 +3275,13 @@ build_cmd(struct drsas_instance *instance, struct scsi_address *ap, { uint16_t flags = 0; uint32_t i; - uint32_t context; + uint32_t context __unused; uint32_t sge_bytes; ddi_acc_handle_t acc_handle; struct drsas_cmd *cmd; struct drsas_sge64 *mfi_sgl; struct scsa_cmd *acmd = PKT2CMD(pkt); - struct drsas_pthru_frame *pthru; + struct drsas_pthru_frame *pthru; struct drsas_io_frame *ldio; /* find out if this is logical or physical drive command. */ @@ -3326,7 +3330,7 @@ build_cmd(struct drsas_instance *instance, struct scsi_address *ap, /* * case SCMD_SYNCHRONIZE_CACHE: - * flush_cache(instance); + * flush_cache(instance); * return_mfi_pkt(instance, cmd); * *cmd_done = 1; * @@ -3423,7 +3427,7 @@ build_cmd(struct drsas_instance *instance, struct scsi_address *ap, break; } - /* fall through For all non-rd/wr cmds */ + /* fall through */ default: switch (pkt->pkt_cdbp[0]) { @@ -4651,7 +4655,7 @@ issue_cmd_in_poll_mode_ppc(struct drsas_instance *instance, ddi_put8(cmd->frame_dma_obj.acc_handle, &frame_hdr->cmd_status, MFI_CMD_STATUS_POLL_MODE); flags = ddi_get16(cmd->frame_dma_obj.acc_handle, &frame_hdr->flags); - flags |= MFI_FRAME_DONT_POST_IN_REPLY_QUEUE; + flags |= MFI_FRAME_DONT_POST_IN_REPLY_QUEUE; ddi_put16(cmd->frame_dma_obj.acc_handle, &frame_hdr->flags, flags); @@ -4699,7 +4703,7 @@ enable_intr_ppc(struct drsas_instance *instance) static void disable_intr_ppc(struct drsas_instance *instance) { - uint32_t mask; + uint32_t mask __unused; con_log(CL_ANN1, (CE_NOTE, "disable_intr_ppc: called")); @@ -5452,7 +5456,7 @@ static int drsas_mode_sense_build(struct scsi_pkt *pkt) { union scsi_cdb *cdbp; - uint16_t page_code; + uint16_t page_code; struct scsa_cmd *acmd; struct buf *bp; struct mode_header *modehdrp; diff --git a/usr/src/uts/intel/io/vmxnet/vmxnet.c b/usr/src/uts/intel/io/vmxnet/vmxnet.c index e0046d8deb..e170f049d9 100644 --- a/usr/src/uts/intel/io/vmxnet/vmxnet.c +++ b/usr/src/uts/intel/io/vmxnet/vmxnet.c @@ -14,6 +14,10 @@ * *********************************************************/ +/* + * Copyright 2018 Joyent, Inc. + */ + #include <sys/types.h> #include <sys/conf.h> #include <sys/debug.h> @@ -1876,7 +1880,7 @@ Vxn_Attach(dev_info_t *dip, ddi_attach_cmd_t cmd) const char *drvName; ddi_acc_handle_t confHdl; uint16_t vid, did; - uint8_t revid; + uint8_t revid __unused; struct pci_phys_spec *regs; caddr_t vxnIOp; ddi_acc_handle_t vxnIOHdl; |