ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] lockdev is orphaned
@ 2007-02-04 10:08 Dmitriy Khanzhin
  2007-02-04 10:25 ` Damir Shayhutdinov
  2007-02-04 10:27 ` [devel] lockdev is orphaned Dmitry V. Levin
  0 siblings, 2 replies; 11+ messages in thread
From: Dmitriy Khanzhin @ 2007-02-04 10:08 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 852 bytes --]

Hi!
Мне lockdev нужен для сборки gphoto2.
Локальная сборка вываливается с криком
[...]
+ gcc -pipe -Wall -O2 -D_GNU_SOURCE -D_REENTRANT
-I/usr/src/RPM/BUILD/lockdev-1.0.1/src -Werror -fPIC -DPIC src/lockdev.c
-shared -Wl,-soname=liblockdev.so.1 -o liblockdev.so.1
cc1: warnings being treated as errors
src/lockdev.c: In function '_dl_check_lock':
src/lockdev.c:460: warning: ignoring return value of 'fscanf', declared
with attribute warn_unused_result
src/lockdev.c:465: warning: ignoring return value of 'link', declared with
attribute warn_unused_result
error: Bad exit status from /usr/src/tmp/rpm-tmp.7004 (%build)

Я так полагаю, это из-за -Werror.
Я решил его не трогать и наваял на коленке патч. Не шедевр, но с ним
собирается.

2 at@: гляньте, пожалуйста. А то мож NMU или совсем отдадите пакет?

-- 
Rgrds, jinn.




[-- Attachment #2: lockdev-1.0.1-alt-fixbuild-20070204.patch --]
[-- Type: text/plain, Size: 858 bytes --]

--- lockdev-1.0.1/src/lockdev.c.dvh	2007-02-04 07:41:22 +0300
+++ lockdev-1.0.1/src/lockdev.c	2007-02-04 07:54:39 +0300
@@ -388,7 +388,8 @@
 	/* no check on lockname */
 	FILE *fd = 0;
 	int j = 0;
-
+	int varemp; /* empty variable */
+	
 	_debug( 3, "_dl_check_lock(lockname=%s)\n", lockname);
 	if ( _dl_block_semaphore() ) {
 		return -1;
@@ -457,12 +458,12 @@
 		if ( ! (fd=fopen( tpname, "r")) ) {
 			return -1;
 		}
-		fscanf( fd, "%d", &pid2);
+		varemp = fscanf( fd, "%d", &pid2);
 		if ( pid2 && (pid2 != pid_read) && ( _dl_pid_exists( pid2))) {
 			/* lock file was changed! let us quickly
 			 * put it back again
 			 */
-			link( tpname, lockname);
+			varemp = link( tpname, lockname);
 			/* could fail, meaning that there is a fourth
 			 * process involved which now owns the lock, but
 			 * it is possible that the third process, who





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-02-05 11:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-04 10:08 [devel] lockdev is orphaned Dmitriy Khanzhin
2007-02-04 10:25 ` Damir Shayhutdinov
2007-02-04 10:47   ` [devel] [JT] " Dmitriy Khanzhin
2007-02-04 21:22   ` [devel] gcc и warn_unused Michael Shigorin
2007-02-04 21:33     ` Damir Shayhutdinov
2007-02-05  9:42       ` Slava Semushin
2007-02-05 11:35         ` Dmitry V. Levin
2007-02-04 22:03     ` Dmitry V. Levin
2007-02-04 22:46     ` Денис Смирнов
2007-02-04 10:27 ` [devel] lockdev is orphaned Dmitry V. Levin
2007-02-04 10:47   ` Dmitriy Khanzhin

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git