bugdevilspie2 - Bugs: bug #58681, Does not compile with Lua 5.4

 
 

bug #58681: Does not compile with Lua 5.4

Submitter:  - <_201500>
Submitted:  Tue 30 Jun 2020 12:49:12 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 06 Sep 2021 03:00:15 AM UTC, comment #2: 

Awesome! Looks like you're the new maintainer of devilspie2? Many thanks for reviving this project!

- <_201500>
Sat 04 Sep 2021 05:03:21 PM UTC, comment #1: 
Darren Salt <dsalt>
Group administrator
Tue 30 Jun 2020 12:49:12 PM UTC, original submission:  

cc -Wall -Wformat -Wno-format-extra-args -Wformat-security -Wformat-nonliteral -Wformat=2  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/at-spi-2.0 -I/usr/include/libwnck-3.0 -pthread -I/usr/include/startup-notification-1.0  -DLOCALEDIR=\"/usr/local/share/locale\" -DPACKAGE=\"devilspie2\" -DDEVILSPIE2_VERSION=\"0.42\" -D_FORTIFY_SOURCE=2 -c src/error_strings.c -o obj/error_strings.o
src/script_functions.c: In function ‘c_debug_print’:
src/script_functions.c:473:27: warning: implicit declaration of function ‘LUA_QL’; did you mean ‘LUA_OK’? [-Wimplicit-function-declaration]
  473 |    return luaL_error(lua, LUA_QL("tostring") " must return a string to "
      |                           ^~~~~~
      |                           LUA_OK
src/script_functions.c:473:45: error: expected ‘)’ before string constant
  473 |    return luaL_error(lua, LUA_QL("tostring") " must return a string to "
      |                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                             )
src/script_functions.c:473:27: warning: passing argument 2 of ‘luaL_error’ makes pointer from integer without a cast [-Wint-conversion]
  473 |    return luaL_error(lua, LUA_QL("tostring") " must return a string to "
      |                           ^~~~~~~~~~~~~~~~~~
      |                           |
      |                           int
In file included from src/script_functions.c:40:
/usr/include/lauxlib.h:75:56: note: expected ‘const char *’ but argument is of type ‘int’
   75 | LUALIB_API int (luaL_error) (lua_State *L, const char *fmt, ...);
      |                                            ~~~~~~~~~~~~^~~
src/script_functions.c: In function ‘c_change_workspace’:
src/script_functions.c:730:2: warning: ‘GTimeVal’ is deprecated: Use 'GDateTime' instead [-Wdeprecated-declarations]
  730 |  GTimeVal timestamp;
      |  ^~~~~~~~
In file included from /usr/include/glib-2.0/glib/galloca.h:32,
                 from /usr/include/glib-2.0/glib.h:30,
                 from /usr/include/glib-2.0/gobject/gbinding.h:28,
                 from /usr/include/glib-2.0/glib-object.h:22,
                 from /usr/include/libwnck-3.0/libwnck/window.h:33,
                 from /usr/include/libwnck-3.0/libwnck/libwnck.h:26,
                 from src/script_functions.c:22:
/usr/include/glib-2.0/glib/gtypes.h:547:8: note: declared here
  547 | struct _GTimeVal
      |        ^~~~~~~~~
src/script_functions.c:758:3: warning: ‘g_get_current_time’ is deprecated: Use 'g_get_real_time' instead [-Wdeprecated-declarations]
  758 |   g_get_current_time(&timestamp);
      |   ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/giochannel.h:33,
                 from /usr/include/glib-2.0/glib.h:54,
                 from /usr/include/glib-2.0/gobject/gbinding.h:28,
                 from /usr/include/glib-2.0/glib-object.h:22,
                 from /usr/include/libwnck-3.0/libwnck/window.h:33,
                 from /usr/include/libwnck-3.0/libwnck/libwnck.h:26,
                 from src/script_functions.c:22:
/usr/include/glib-2.0/glib/gmain.h:679:8: note: declared here
  679 | void   g_get_current_time                 (GTimeVal       *result);
      |        ^~~~~~~~~~~~~~~~~~

Here is a fix:

--- devilspie2-0.43/src/script_functions.c.orig 2020-06-30 20:28:56.388791204 +0800
+++ devilspie2-0.43/src/script_functions.c 2020-06-30 20:29:05.018556227 +0800
@@ -470,8 +470,7 @@
  lua_call(lua, 1, 1);
  s = lua_tostring(lua, -1);  /* get result */
  if (s == NULL)
- return luaL_error(lua, LUA_QL("tostring") " must return a string to "
-                   LUA_QL("print"));
+ return luaL_error(lua, "'tostring' must return a string to 'print'");
  if (i > 1) {
  if (devilspie2_debug) fputs("\t", stdout);
  }

Please consider applying it, thanks!

- <_201500>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dsalt (Posted a comment)
  • -email is unavailable- added by _201500 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-09-05 dsalt StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code