public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/openrc:master commit in: src/includes/, src/rc/
Date: Tue, 12 Jan 2016 20:12:22 +0000 (UTC)	[thread overview]
Message-ID: <1451675608.981d2b3308edb0d0a68f7bdce4f2c99110de6940.williamh@OpenRC> (raw)

commit:     981d2b3308edb0d0a68f7bdce4f2c99110de6940
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Fri Jan  1 19:13:28 2016 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Jan  1 19:13:28 2016 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=981d2b33

rc: clean up compiler warnings

The get_systype(), detect_container(), detect_prefix() and detect_vm()
functions need to return "char *" instead of "const char *".

 src/includes/rc-misc.h |  8 ++++----
 src/rc/_usage.c        |  2 +-
 src/rc/rc-misc.c       | 10 +++++-----
 src/rc/rc.c            |  6 +++---
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/includes/rc-misc.h b/src/includes/rc-misc.h
index 89d6336..fa370e4 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 *);
-const char *detect_prefix(void);
-const char *get_systype(void);
-const char *detect_container(void);
-const char *detect_vm(void);
+char *detect_prefix(void);
+char *get_systype(void);
+char *detect_container(void);
+char *detect_vm(void);
 #endif

diff --git a/src/rc/_usage.c b/src/rc/_usage.c
index e190eb4..b5f664a 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)
 {
-	const char *systype = NULL;
+	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 f1dad3b..bb401e1 100644
--- a/src/rc/rc-misc.c
+++ b/src/rc/rc-misc.c
@@ -126,7 +126,7 @@ env_config(void)
 	char *np;
 	char *npp;
 	char *tok;
-	const char *sys = NULL;
+	char *sys = NULL;
 	char buffer[PATH_MAX];
 
 	/* Ensure our PATH is prefixed with the system locations first
@@ -380,7 +380,7 @@ found:
 	return retval;
 }
 
-const char *detect_prefix(void)
+char *detect_prefix(void)
 {
 #ifdef PREFIX
 	return RC_SYS_PREFIX;
@@ -389,7 +389,7 @@ const char *detect_prefix(void)
 #endif
 }
 
-const char *get_systype(void)
+char *get_systype(void)
 {
 	char *systype = rc_conf_value("rc_sys");
 	if (systype) {
@@ -404,7 +404,7 @@ const char *get_systype(void)
 	return systype;
 }
 
-const char *detect_container(void)
+char *detect_container(void)
 {
 	char *systype = get_systype();
 
@@ -459,7 +459,7 @@ const char *detect_container(void)
 	return NULL;
 }
 
-const char *detect_vm(void)
+char *detect_vm(void)
 {
 	char *systype = get_systype();
 

diff --git a/src/rc/rc.c b/src/rc/rc.c
index a0b1886..64541e0 100644
--- a/src/rc/rc.c
+++ b/src/rc/rc.c
@@ -261,7 +261,7 @@ open_shell(void)
 	struct passwd *pw;
 
 #ifdef __linux__
-	const char *sys = NULL;
+	char *sys = NULL;
 	
 	sys = detect_container();
 	if (!sys)
@@ -450,7 +450,7 @@ static void
 do_sysinit()
 {
 	struct utsname uts;
-	const char *sys;
+	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;
-	const char *systype = NULL;
+	char *systype = NULL;
 	static RC_STRINGLIST *hotplugged_services;
 	static RC_STRINGLIST *stop_services;
 	static RC_STRINGLIST *start_services;


             reply	other threads:[~2016-01-12 20:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-12 20:12 William Hubbs [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-05-18 22:27 [gentoo-commits] proj/openrc:master commit in: src/includes/, src/rc/ William Hubbs
2017-08-23 19:38 William Hubbs
2016-01-19  6:12 William Hubbs
2016-01-12 20:12 William Hubbs
2016-01-12 20:12 William Hubbs
2015-12-08 18:43 William Hubbs
2012-01-26 19:47 Christian Ruppert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1451675608.981d2b3308edb0d0a68f7bdce4f2c99110de6940.williamh@OpenRC \
    --to=williamh@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox