From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-856915-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D1DBB1388BF for <garchives@archives.gentoo.org>; Tue, 12 Jan 2016 20:12:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5E020E0881; Tue, 12 Jan 2016 20:12:26 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B1BBBE0881 for <gentoo-commits@lists.gentoo.org>; Tue, 12 Jan 2016 20:12:25 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AB1ED340B6A for <gentoo-commits@lists.gentoo.org>; Tue, 12 Jan 2016 20:12:24 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 05159CFE for <gentoo-commits@lists.gentoo.org>; Tue, 12 Jan 2016 20:12:23 +0000 (UTC) From: "William Hubbs" <williamh@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" <williamh@gentoo.org> Message-ID: <1451977500.fe485f44339963fdbee143687dcbef2069924bc6.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: src/includes/, src/rc/ X-VCS-Repository: proj/openrc X-VCS-Files: src/includes/rc-misc.h src/rc/_usage.c src/rc/rc-misc.c src/rc/rc.c X-VCS-Directories: src/includes/ src/rc/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: fe485f44339963fdbee143687dcbef2069924bc6 X-VCS-Branch: master Date: Tue, 12 Jan 2016 20:12:23 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 16cf8a94-8c1c-43e0-a683-9252bea869b6 X-Archives-Hash: 34e8b5522623168ddbb8839913c0cd97 commit: fe485f44339963fdbee143687dcbef2069924bc6 Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com> AuthorDate: Tue Jan 5 06:57:40 2016 +0000 Commit: William Hubbs <williamh <AT> gentoo <DOT> org> CommitDate: Tue Jan 5 07:05:00 2016 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=fe485f44 rc: fix compiler warnings cleanup This reverts commit 981d2b3308edb0d0a68f7bdce4f2c99110de6940 and fixes the warnings that generated. src/includes/rc-misc.h | 8 ++++---- src/rc/_usage.c | 2 +- src/rc/rc-misc.c | 14 +++++++------- src/rc/rc.c | 6 +++--- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/includes/rc-misc.h b/src/includes/rc-misc.h index fa370e4..89d6336 100644 --- a/src/includes/rc-misc.h +++ b/src/includes/rc-misc.h @@ -74,8 +74,8 @@ int is_writable(const char *); #define service_stop(service) exec_service(service, "stop"); int parse_mode(mode_t *, char *); -char *detect_prefix(void); -char *get_systype(void); -char *detect_container(void); -char *detect_vm(void); +const char *detect_prefix(void); +const char *get_systype(void); +const char *detect_container(void); +const char *detect_vm(void); #endif diff --git a/src/rc/_usage.c b/src/rc/_usage.c index b5f664a..e190eb4 100644 --- a/src/rc/_usage.c +++ b/src/rc/_usage.c @@ -40,7 +40,7 @@ static void set_quiet_options(void) _noreturn static void show_version(void) { - char *systype = NULL; + const char *systype = NULL; printf("%s (OpenRC", applet); systype = detect_container(); diff --git a/src/rc/rc-misc.c b/src/rc/rc-misc.c index dbdac68..f2f4d9f 100644 --- a/src/rc/rc-misc.c +++ b/src/rc/rc-misc.c @@ -122,7 +122,7 @@ env_config(void) char *np; char *npp; char *tok; - char *sys = NULL; + const char *sys = NULL; char buffer[PATH_MAX]; /* Ensure our PATH is prefixed with the system locations first @@ -376,7 +376,7 @@ found: return retval; } -char *detect_prefix(void) +const char *detect_prefix(void) { #ifdef PREFIX return RC_SYS_PREFIX; @@ -385,7 +385,7 @@ char *detect_prefix(void) #endif } -char *get_systype(void) +const char *get_systype(void) { char *systype = rc_conf_value("rc_sys"); if (systype) { @@ -400,9 +400,9 @@ char *get_systype(void) return systype; } -char *detect_container(void) +const char *detect_container(void) { - char *systype = get_systype(); + const char *systype = get_systype(); #ifdef __FreeBSD__ if (systype && strcmp(systype, RC_SYS_JAIL) == 0) @@ -455,9 +455,9 @@ char *detect_container(void) return NULL; } -char *detect_vm(void) +const char *detect_vm(void) { - char *systype = get_systype(); + const char *systype = get_systype(); #ifdef __NetBSD__ if (systype) { diff --git a/src/rc/rc.c b/src/rc/rc.c index 64541e0..a0b1886 100644 --- a/src/rc/rc.c +++ b/src/rc/rc.c @@ -261,7 +261,7 @@ open_shell(void) struct passwd *pw; #ifdef __linux__ - char *sys = NULL; + const char *sys = NULL; sys = detect_container(); if (!sys) @@ -450,7 +450,7 @@ static void do_sysinit() { struct utsname uts; - char *sys; + const char *sys; /* exec init-early.sh if it exists * This should just setup the console to use the correct @@ -749,7 +749,7 @@ main(int argc, char **argv) { const char *bootlevel = NULL; char *newlevel = NULL; - char *systype = NULL; + const char *systype = NULL; static RC_STRINGLIST *hotplugged_services; static RC_STRINGLIST *stop_services; static RC_STRINGLIST *start_services;