Bug#633829: libpthread-workqueue: FTBFS: src/posix/manager.c:343:134: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]

2011-07-16 Thread Mark Heily

On 07/14/2011 02:51 AM, Nobuhiro Iwamatsu wrote:

Source: libpthread-workqueue
Version: 0.8.1-1
Severity: serious
Tags: patch

Hi,

libpthread-workqueue FTBFS on some architecture.
   https://buildd.debian.org/status/package.php?p=libpthread-workqueue
   http://buildd.debian-ports.org/status/package.php?p=libpthread-workqueue

-
checking for err.h.. yes
Creating config.h
Creating config.mk
dh_auto_build
make[1]: Entering directory
`/build/buildd-libpthread-workqueue_0.8.1-1-armel-LQB520/libpthread-workqueue-0.8.1'
/usr/bin/cc -c -o src/api.o -Wall -Wextra -Werror -D_XOPEN_SOURCE=600
-D__EXTENSIONS__ -D_GNU_SOURCE -std=c99 -I./include -I./src -g -O2
-fpic -fvisibility=hidden -pthread src/api.c
/usr/bin/cc -c -o src/posix/manager.o -Wall -Wextra -Werror
-D_XOPEN_SOURCE=600 -D__EXTENSIONS__ -D_GNU_SOURCE -std=c99
-I./include -I./src -g -O2 -fpic -fvisibility=hidden -pthread
src/posix/manager.c
src/posix/manager.c: In function 'worker_main':
src/posix/manager.c:343:134: error: comparison between signed and
unsigned integer expressions [-Werror=sign-compare]
cc1: all warnings being treated as errors

make[1]: *** [src/posix/manager.o] Error 1
make[1]: Leaving directory
`/build/buildd-libpthread-workqueue_0.8.1-1-armel-LQB520/libpthread-workqueue-0.8.1'
dh_auto_build: make -j1 returned exit code 2
make: *** [build] Error 2
-

I made patch which revise this problem. Could you apply this patch?

Best regards,
  Nobuhiro


Hi,

Thanks for the info and the patch. I have fixed this in version 0.8.2 by 
making PWQ_SPIN_USEC have time_t type to match that used in struct 
timespec. This works on i386 and amd64, and should work on other platforms.


Regards,

 - Mark



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#633829: libpthread-workqueue: FTBFS: src/posix/manager.c:343:134: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]

2011-07-13 Thread Nobuhiro Iwamatsu
Source: libpthread-workqueue
Version: 0.8.1-1
Severity: serious
Tags: patch

Hi,

libpthread-workqueue FTBFS on some architecture.
  https://buildd.debian.org/status/package.php?p=libpthread-workqueue
  http://buildd.debian-ports.org/status/package.php?p=libpthread-workqueue

-
checking for err.h.. yes
Creating config.h
Creating config.mk
   dh_auto_build
make[1]: Entering directory
`/build/buildd-libpthread-workqueue_0.8.1-1-armel-LQB520/libpthread-workqueue-0.8.1'
/usr/bin/cc -c -o src/api.o -Wall -Wextra -Werror -D_XOPEN_SOURCE=600
-D__EXTENSIONS__ -D_GNU_SOURCE -std=c99 -I./include -I./src -g -O2
-fpic -fvisibility=hidden -pthread src/api.c
/usr/bin/cc -c -o src/posix/manager.o -Wall -Wextra -Werror
-D_XOPEN_SOURCE=600 -D__EXTENSIONS__ -D_GNU_SOURCE -std=c99
-I./include -I./src -g -O2 -fpic -fvisibility=hidden -pthread
src/posix/manager.c
src/posix/manager.c: In function 'worker_main':
src/posix/manager.c:343:134: error: comparison between signed and
unsigned integer expressions [-Werror=sign-compare]
cc1: all warnings being treated as errors

make[1]: *** [src/posix/manager.o] Error 1
make[1]: Leaving directory
`/build/buildd-libpthread-workqueue_0.8.1-1-armel-LQB520/libpthread-workqueue-0.8.1'
dh_auto_build: make -j1 returned exit code 2
make: *** [build] Error 2
-

I made patch which revise this problem. Could you apply this patch?

Best regards,
 Nobuhiro
-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6
--- a/src/posix/manager.c   2011-07-14 06:30:21.0 +
+++ b/src/posix/manager.c   2011-07-14 06:11:12.0 +
@@ -340,7 +340,7 @@  
 ts_now.tv_nsec = ts_start.tv_nsec;

 // Spin until we get an item or PWQ_SPIN_USEC microseconds passes
-while (!witem && (((ts_now.tv_sec - ts_start.tv_sec) * 100) + (((ts_now.tv_nsec - ts_start.tv_nsec) / 1000)) <= PWQ_SPIN_USEC))
+while (!witem && ((unsigned int)((ts_now.tv_sec - ts_start.tv_sec) * 100) + (((ts_now.tv_nsec - ts_start.tv_nsec) / 1000))) <= PWQ_SPIN_USEC)
 {   
 witem = wqlist_scan(&queue_priority);
 if (!witem)