From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25868 invoked by alias); 26 Feb 2004 21:08:00 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 25850 invoked from network); 26 Feb 2004 21:08:00 -0000 Received: from unknown (HELO sunsite.ms.mff.cuni.cz) (195.113.19.66) by sources.redhat.com with SMTP; 26 Feb 2004 21:08:00 -0000 Received: from sunsite.ms.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8) with ESMTP id i1QIxPt0003279; Thu, 26 Feb 2004 19:59:25 +0100 Received: (from jakub@localhost) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8/Submit) id i1QIu9CA003232; Thu, 26 Feb 2004 19:56:09 +0100 Date: Thu, 26 Feb 2004 21:08:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] Fix clock_settime Message-ID: <20040226185609.GA3126@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-SW-Source: 2004-02/txt/msg00056.txt.bz2 Hi! This patch fixes: ../sysdeps/unix/clock_settime.c: In function `clock_settime': ../sysdeps/unix/clock_settime.c:43: warning: `retval' might be used uninitialized in this function warnings, which were correct in this case. 2004-02-26 Jakub Jelinek * sysdeps/unix/sysv/linux/clock_settime.c (SYSDEP_SETTIME): Set retval to -1 on error. --- libc/sysdeps/unix/sysv/linux/clock_settime.c.jj 2003-03-03 05:49:24.000000000 +0100 +++ libc/sysdeps/unix/sysv/linux/clock_settime.c 2004-02-26 21:52:06.249044328 +0100 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -60,7 +60,10 @@ extern int __libc_missing_posix_timers a if (e == EINVAL && clock_id == CLOCK_REALTIME) \ HANDLE_REALTIME; \ else \ - __set_errno (e); \ + { \ + __set_errno (e); \ + retval = -1; \ + } \ } \ break #endif Jakub