|
From: Ethan A M. <sf...@us...> - 2012-08-28 18:29:04
|
On Tuesday, August 28, 2012 10:20:35 am Mojca Miklavec wrote:
> What about the other two trivial patches?
>
> --- a/src/set.c
> +++ b/src/set.c
> @@ -1420,10 +1420,10 @@ static void
> set_degreesign(char *locale)
> {
> #if defined(HAVE_ICONV) && !(defined WIN32)
> - char degree_utf8[3] = {'\302', '\260', '\0'};
> + const char degree_utf8[3] = {'\302', '\260', '\0'};
> size_t lengthin = 3;
> size_t lengthout = 8;
> - char *in = degree_utf8;
> + const char *in = degree_utf8;
> char *out = degree_sign;
> iconv_t cd;
That generates the following warning instead:
set.c:1444:17: warning: passing 'const char **' to parameter of type 'char **'
discards qualifiers in nested pointer types [-Wincompatible-pointer-types]
if (iconv(cd, &in, &lengthin, &out, &lengthout) == (size_t)(-1))
IMHO "const char" is impossible to get right, and warnings can safely
be ignored.
> --- a/term/lua.trm
> +++ b/term/lua.trm
> @@ -168,7 +168,7 @@ static char last_error_msg[MAX_LINE_LEN+1] = "";
> * the plot's bounding box
> */
> static int
> -LUA_GP_get_boundingbox() {
> +LUA_GP_get_boundingbox(lua_State *L) {
> lua_newtable (L);
> lua_pushstring (L, "xleft");
> lua_pushinteger(L, plot_bounds.xleft);
Wouldn't that require a corresponding change in the call site[s]?
For that matter, where _are_ the call sites - in the lua code?
Ethan
|