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

 
 

bug #58681: Does not compile with Lua 5.4

Submitted by:  Chih-Hsuan Yen <yan12125>
Submitted on:  Tue 30 Jun 2020 12:49:12 PM UTC  
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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!

Chih-Hsuan Yen <yan12125>

 

(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 yan12125 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.5