Browse code

Various warnings fixed (mostly appearing with 64b compiles).

Closes issue SER-343.

Bogdan Pintea authored on 31/03/2008 18:57:54
Showing 2 changed files
... ...
@@ -134,12 +134,12 @@ int w_parse_select(char**p, select_t* sel)
134 134
 		(*p)++;
135 135
 	};
136 136
 	if (sel->n==0) {
137
-		ERR("parse_select: invalid select '%.*s'\n", *p - select_name, select_name);
137
+		ERR("parse_select: invalid select '%.*s'\n", (int)(*p - select_name), select_name);
138 138
 		goto error;
139 139
 	};
140 140
 	DBG("parse_select: end, total elements: %d, calling resolve_select\n", sel->n);
141 141
 	if (resolve_select(sel)<0) {
142
-		ERR("parse_select: error while resolve_select '%.*s'\n", *p - select_name, select_name);
142
+		ERR("parse_select: error while resolve_select '%.*s'\n", (int)(*p - select_name), select_name);
143 143
 		goto error;
144 144
 	}
145 145
 	return 0;
... ...
@@ -103,7 +103,8 @@ typedef struct _str str;
103 103
  * more details.
104 104
  */
105 105
 #define STR_FMT(_pstr_)	\
106
-  ((_pstr_) ? (_pstr_)->len : 0), ((_pstr_) ? (_pstr_)->s : "")
106
+  ((_pstr_ != (str *)0) ? (_pstr_)->len : 0), \
107
+  ((_pstr_ != (str *)0) ? (_pstr_)->s : "")
107 108
 
108 109
 
109 110
 /** Compares two ::str strings.