Source: wbar
Severity: minor
Tags: patch
User: [email protected]
Usertags: clang-ftbfs
Dear Maintainer,
Your package fails to build with clang instead of gcc.
The attached patch fixes it.
Best regards,
Alexander.
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.13-1-amd64 (SMP w/3 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--- wbar-2.3.4/src/core/Main.cc 2012-09-17 22:26:41.000000000 -0400
+++ wbar-2.3.4-my/src/core/Main.cc 2014-03-16 08:24:32.778257416 -0400
@@ -228,7 +228,7 @@
// note the size of icons in config befor we add any active icons
configitems = (size_t) list.size();
//loop until actual window data is obtained
- while (mapIcons());
+ while (mapIcons()) {};
/* Show the Bar */
if (optparser.isSet(OptParser::ABOVE_DESK))
--- wbar-2.3.4/src/core/SuperBar.cc 2012-03-03 13:03:11.000000000 -0500
+++ wbar-2.3.4-my/src/core/SuperBar.cc 2014-03-16 08:27:27.489332879 -0400
@@ -133,7 +133,8 @@
void SuperBar::addIcon(string path, string comm, string txt, unsigned long winid,
unsigned char *icondata, int iw, int ih, int refl_size){
SuperIcon *ic;
- int textW, textH;
+ int textW = 0;
+ int textH = 0;
if(font){
imlib_context_set_font(font);
--- wbar-2.3.4/src/config/Functions.h 2011-12-05 15:55:18.000000000 -0500
+++ wbar-2.3.4-my/src/config/Functions.h 2014-03-16 08:28:59.958800392 -0400
@@ -26,7 +26,7 @@
void on_settings_delete();
void on_settings_update();
void on_settings_close();
- std::string getCommand();
+ const char *getCommand();
bool validate();
void on_app_accept();
--- wbar-2.3.4/src/config/Functions.cc 2012-09-18 22:54:53.000000000 -0400
+++ wbar-2.3.4-my/src/config/Functions.cc 2014-03-16 08:29:51.065493990 -0400
@@ -839,7 +839,7 @@
gtk_main_quit();
}
-std::string getCommand()
+const char *getCommand()
{
std::string command;
command = PACKAGE_NAME;
@@ -1059,7 +1059,7 @@
command += text;
}
- return command;
+ return command.c_str();
}
bool validate()