aboutsummaryrefslogtreecommitdiff
path: root/lib/cpluff/patches/0005-all-Fix-unsigned-signed-warnings.patch
blob: 1657962de27acac82e4ff82a2f0a38e2ef9c4209 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
From 6956744aa9e38f961eef0b6bffbc59690d153b64 Mon Sep 17 00:00:00 2001
From: "h.udo" <hudokkow@gmail.com>
Date: Thu, 20 Oct 2016 14:24:32 +0100
Subject: [PATCH 05/12] [all] Fix unsigned/signed warnings

---
 libcpluff/pcontrol.c | 10 +++++-----
 libcpluff/pinfo.c    |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/libcpluff/pcontrol.c b/libcpluff/pcontrol.c
index 130a3a2..2f47591 100644
--- a/libcpluff/pcontrol.c
+++ b/libcpluff/pcontrol.c
@@ -67,7 +67,7 @@ static void assert_processed_zero(cp_context_t *context) {
 #endif
 
 static void unregister_extensions(cp_context_t *context, cp_plugin_info_t *plugin) {
-	int i;
+	unsigned int i;
 	
 	for (i = 0; i < plugin->num_ext_points; i++) {
 		cp_ext_point_t *ep = plugin->ext_points + i;
@@ -109,7 +109,7 @@ CP_C_API cp_status_t cp_install_plugin(cp_context_t *context, cp_plugin_info_t *
 	cp_plugin_t *rp = NULL;
 	cp_status_t status = CP_OK;
 	cpi_plugin_event_t event;
-	int i;
+	unsigned int i;
 
 	CHECK_NOT_NULL(context);
 	CHECK_NOT_NULL(plugin);
@@ -421,7 +421,7 @@ static int resolve_plugin_prel_rec(cp_context_t *context, cp_plugin_t *plugin) {
 	cp_status_t status = CP_OK;
 	int error_reported = 0;
 	lnode_t *node = NULL;
-	int i;
+	unsigned int i;
 
 	// Check if already resolved
 	if (plugin->state >= CP_PLUGIN_RESOLVED) {
@@ -1092,7 +1092,7 @@ static void free_extension_content(cp_extension_t *extension) {
 }
 
 static void free_cfg_element_content(cp_cfg_element_t *ce) {
-	int i;
+	unsigned int i;
 
 	assert(ce != NULL);
 	free(ce->name);
@@ -1108,7 +1108,7 @@ static void free_cfg_element_content(cp_cfg_element_t *ce) {
 }
 
 CP_HIDDEN void cpi_free_plugin(cp_plugin_info_t *plugin) {
-	int i;
+	unsigned int i;
 	
 	assert(plugin != NULL);
 	free(plugin->name);
diff --git a/libcpluff/pinfo.c b/libcpluff/pinfo.c
index 6492712..29c629b 100644
--- a/libcpluff/pinfo.c
+++ b/libcpluff/pinfo.c
@@ -667,7 +667,7 @@ static cp_cfg_element_t * lookup_cfg_element(cp_cfg_element_t *base, const char
 		if (end - start == 2 && !strncmp(path + start, "..", 2)) {
 			base = base->parent;
 		} else {
-			int i;
+			unsigned int i;
 			int found = 0;
 			
 			for (i = 0; !found && i < base->num_children; i++) {
@@ -711,7 +711,7 @@ CP_C_API char * cp_lookup_cfg_value(cp_cfg_element_t *base, const char *path) {
 		if (attr == NULL) {
 			return e->value;
 		} else {
-			int i;
+			unsigned int i;
 			
 			for (i = 0; i < e->num_atts; i++) {
 				if (!strcmp(attr, e->atts[2*i])) {
-- 
2.14.1