From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28793 invoked by alias); 20 Nov 2004 17:01:14 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 28759 invoked from network); 20 Nov 2004 17:01:07 -0000 Received: from unknown (HELO hiauly1.hia.nrc.ca) (132.246.100.193) by sourceware.org with SMTP; 20 Nov 2004 17:01:07 -0000 Received: from hiauly1.hia.nrc.ca (hiauly1.hia.nrc.ca [127.0.0.1] (may be forged)) by hiauly1.hia.nrc.ca (8.12.9-20030917/8.12.9) with ESMTP id iAKH16ko020351 for ; Sat, 20 Nov 2004 12:01:06 -0500 (EST) Received: (from dave@localhost) by hiauly1.hia.nrc.ca (8.12.9-20030917/8.12.9/Submit) id iAKH15GW020350 for binutils@sources.redhat.com; Sat, 20 Nov 2004 12:01:05 -0500 (EST) Message-Id: <200411201701.iAKH15GW020350@hiauly1.hia.nrc.ca> Subject: [committed] Fix warning from hpux-core.c To: binutils@sources.redhat.com Date: Sat, 20 Nov 2004 17:01:00 -0000 From: "John David Anglin" MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2004-11/txt/msg00298.txt.bz2 This change fixes three warnings from hpux-core.c when compiled on hppa64-hp-hpux11.11. Dave -- J. David Anglin dave.anglin@nrc-cnrc.gc.ca National Research Council of Canada (613) 990-0752 (FAX: 952-6602) 2004-11-20 John David Anglin * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to make_bfd_asection. Index: hpux-core.c =================================================================== RCS file: /cvs/src/src/bfd/hpux-core.c,v retrieving revision 1.14 diff -u -3 -p -r1.14 hpux-core.c --- hpux-core.c 13 Sep 2004 03:51:22 -0000 1.14 +++ hpux-core.c 20 Nov 2004 16:33:06 -0000 @@ -244,10 +244,11 @@ hpux_core_core_file_p (abfd) if (core_kernel_thread_id (abfd) == 0) { if (!make_bfd_asection (abfd, ".reg", - SEC_HAS_CONTENTS, - core_header.len, - (int) &proc_info - (int) & proc_info.hw_regs, - 2)) + SEC_HAS_CONTENTS, + core_header.len, + (bfd_vma) offsetof (struct proc_info, + hw_regs), + 2)) goto fail; } else @@ -259,17 +260,19 @@ hpux_core_core_file_p (abfd) if (!make_bfd_asection (abfd, ".reg", SEC_HAS_CONTENTS, core_header.len, - (int) &proc_info - (int) & proc_info.hw_regs, + (bfd_vma)offsetof (struct proc_info, + hw_regs), 2)) goto fail; } /* We always make one of these sections, for every thread. */ sprintf (secname, ".reg/%d", core_kernel_thread_id (abfd)); if (!make_bfd_asection (abfd, secname, - SEC_HAS_CONTENTS, - core_header.len, - (int) &proc_info - (int) & proc_info.hw_regs, - 2)) + SEC_HAS_CONTENTS, + core_header.len, + (bfd_vma) offsetof (struct proc_info, + hw_regs), + 2)) goto fail; } core_signal (abfd) = proc_info.sig;