All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Marlin <dmarlin@redhat.com>
To: LTP list <ltp-list@lists.sourceforge.net>
Subject: [LTP] warning when building sighold02.c
Date: Mon, 16 Aug 2010 13:51:08 -0500	[thread overview]
Message-ID: <4C69889C.6040202@redhat.com> (raw)

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


The functions read_pipe and write_pipe in sighold02.c each expect a 
single file descriptor as arguments, however the function prototypes 
define no arguments.  Also, the function references to read_pipe pass 
two arguments, a file descriptor and '0'.  The second argument should 
not be passed, as it is not used.

Attached is a patch to make the function argument definitions and uses 
consistent within this testcase.


Signed-off-by: d.marlin <dmarlin@redhat.com>



[-- Attachment #2: sighold02.c.patch --]
[-- Type: text/x-patch, Size: 1261 bytes --]

--- testcases/kernel/syscalls/sighold/sighold02.c.orig	2010-04-01 01:23:11.000000000 -0500
+++ testcases/kernel/syscalls/sighold/sighold02.c	2010-07-07 19:41:26.323612559 -0500
@@ -145,8 +145,8 @@
 void cleanup();
 static void getout();
 static void timeout();
-static int read_pipe();
-static int write_pipe();
+static int read_pipe(int fd);
+static int write_pipe(int fd);
 static int setup_sigs(char *mesg);
 static void handle_sigs();
 static int set_timeout(char *mesg);
@@ -202,7 +202,7 @@
 			tst_sig(FORK, DEF_HANDLER, getout);
 
 			/* wait for "ready" message from child */
-			if (read_pipe(PARENTSREADFD, 0) != 0) {
+			if (read_pipe(PARENTSREADFD) != 0) {
 				/* read_pipe() failed. */
 				tst_brkm(TBROK, getout, "%s", p_p.mesg);
 			}
@@ -272,7 +272,7 @@
 			 * Get childs reply about received signals.
 			 */
 
-			if (read_pipe(PARENTSREADFD, 0) < 0) {
+			if (read_pipe(PARENTSREADFD) < 0) {
 				tst_brkm(TBROK, getout, "%s", p_p.mesg);
 			}
 
@@ -384,7 +384,7 @@
 	/*
 	 * Read pipe from parent, that will tell us that all signals were sent
 	 */
-	if (read_pipe(CHILDSREADFD, 0) != 0) {
+	if (read_pipe(CHILDSREADFD) != 0) {
 		p_p.result = TBROK;
 		strcpy(p_p.mesg, "read() pipe failed");
 	} else if (signals_received[0] == '\0') {


[-- Attachment #3: Type: text/plain, Size: 224 bytes --]

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 

[-- Attachment #4: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

             reply	other threads:[~2010-08-16 18:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-16 18:51 David Marlin [this message]
2010-08-16 22:59 ` [LTP] warning when building sighold02.c Garrett Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C69889C.6040202@redhat.com \
    --to=dmarlin@redhat.com \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.