All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] Fix build failure with fomat-security. Specify the format type.
@ 2014-03-09 11:56 Ritesh Raj Sarraf
  2014-03-09 11:56 ` [PATCH 2/3] Minor spelling error fixes Ritesh Raj Sarraf
  2014-03-09 11:56 ` [PATCH 3/3] Library with an exit() Ritesh Raj Sarraf
  0 siblings, 2 replies; 5+ messages in thread
From: Ritesh Raj Sarraf @ 2014-03-09 11:56 UTC (permalink / raw)
  To: christophe.varoqui; +Cc: Ritesh Raj Sarraf, dm-devel

cc -g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat
-Werror=format-security -D_FORTIFY_SOURCE=2 -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -Wunused -Wstrict-prototypes -fPIC
-DLIB_STRING=\"lib\" -I.. -c -o rdac.o rdac.c
rdac.c: In function 'libcheck_check':
rdac.c:311:3: error: format not a string literal and no format arguments
[-Werror=format-security]
   MSG(c, (inqfail) ? MSG_RDAC_DOWN_TYPE("inquiry failed") :
   ^
rdac.c:311:3: error: format not a string literal and no format arguments
[-Werror=format-security]
cc1: some warnings being treated as errors
make[2]: *** [rdac.o] Error 1

Signed-off-by: Ritesh Raj Sarraf <rrs@debian.org>
---
 libmultipath/checkers/rdac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libmultipath/checkers/rdac.c b/libmultipath/checkers/rdac.c
index e0b2ea4..00e3c44 100644
--- a/libmultipath/checkers/rdac.c
+++ b/libmultipath/checkers/rdac.c
@@ -308,7 +308,7 @@ libcheck_check (struct checker * c)
 done:
 	switch (ret) {
 	case PATH_DOWN:
-		MSG(c, (inqfail) ? MSG_RDAC_DOWN_TYPE("inquiry failed") :
+		MSG(c, "%s", (inqfail) ? MSG_RDAC_DOWN_TYPE("inquiry failed") :
 			checker_msg_string(&inq));
 		break;
 	case PATH_UP:
-- 
1.9.0

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

* [PATCH 2/3] Minor spelling error fixes
  2014-03-09 11:56 [PATCH 1/3] Fix build failure with fomat-security. Specify the format type Ritesh Raj Sarraf
@ 2014-03-09 11:56 ` Ritesh Raj Sarraf
  2014-03-09 11:56 ` [PATCH 3/3] Library with an exit() Ritesh Raj Sarraf
  1 sibling, 0 replies; 5+ messages in thread
From: Ritesh Raj Sarraf @ 2014-03-09 11:56 UTC (permalink / raw)
  To: christophe.varoqui; +Cc: Ritesh Raj Sarraf, dm-devel

Signed-off-by: Ritesh Raj Sarraf <rrs@debian.org>
---
 multipath/multipath.conf.5 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
index cf5bec0..1a904e9 100644
--- a/multipath/multipath.conf.5
+++ b/multipath/multipath.conf.5
@@ -426,7 +426,7 @@ The \fIWorld Wide Identification\fR of a device.
 Regular expression of the device nodes to be excluded.
 .TP
 .B property
-Regular expresion of the udev property to be excluded.
+Regular expression of the udev property to be excluded.
 .TP
 .B device
 Subsection for the device description. This subsection recognizes the
@@ -453,7 +453,7 @@ The following keywords are recognized:
 The \fIWorld Wide Identification\fR of a device.
 .TP
 .B property
-Regular expresion of the udev property to be whitelisted. Defaults to
+Regular expression of the udev property to be whitelisted. Defaults to
 .I (ID_WWN|ID_SCSI_VPD)
 .TP
 .B devnode
-- 
1.9.0

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

* [PATCH 3/3] Library with an exit()
  2014-03-09 11:56 [PATCH 1/3] Fix build failure with fomat-security. Specify the format type Ritesh Raj Sarraf
  2014-03-09 11:56 ` [PATCH 2/3] Minor spelling error fixes Ritesh Raj Sarraf
@ 2014-03-09 11:56 ` Ritesh Raj Sarraf
  2014-03-09 12:27   ` Bart Van Assche
  1 sibling, 1 reply; 5+ messages in thread
From: Ritesh Raj Sarraf @ 2014-03-09 11:56 UTC (permalink / raw)
  To: christophe.varoqui; +Cc: Ritesh Raj Sarraf, dm-devel

Signed-off-by: Ritesh Raj Sarraf <rrs@debian.org>
---
 libmpathpersist/mpath_persist.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/libmpathpersist/mpath_persist.c b/libmpathpersist/mpath_persist.c
index bd30125..6b6901e 100644
--- a/libmpathpersist/mpath_persist.c
+++ b/libmpathpersist/mpath_persist.c
@@ -585,11 +585,12 @@ int send_prout_activepath(char * dev, int rq_servact, int rq_scope,
 	rc = pthread_create(&thread, &attr, mpath_prout_pthread_fn, (void *)(&param));
 	if (rc){
 		condlog (3, "%s: failed to create thread %d", dev, rc);
-		exit(-1);
 	}
-	/* Free attribute and wait for the other threads */
-	pthread_attr_destroy(&attr);
-	rc = pthread_join(thread, NULL);
+	else {
+		/* Free attribute and wait for the other threads */
+		pthread_attr_destroy(&attr);
+		rc = pthread_join(thread, NULL);
+	}
 
 	return (param.status);
 }
-- 
1.9.0

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

* Re: [PATCH 3/3] Library with an exit()
  2014-03-09 11:56 ` [PATCH 3/3] Library with an exit() Ritesh Raj Sarraf
@ 2014-03-09 12:27   ` Bart Van Assche
  2014-03-10 22:22     ` Christophe Varoqui
  0 siblings, 1 reply; 5+ messages in thread
From: Bart Van Assche @ 2014-03-09 12:27 UTC (permalink / raw)
  To: device-mapper development, christophe.varoqui; +Cc: Ritesh Raj Sarraf

On 03/09/14 12:56, Ritesh Raj Sarraf wrote:
> Signed-off-by: Ritesh Raj Sarraf <rrs@debian.org>
> ---
>  libmpathpersist/mpath_persist.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/libmpathpersist/mpath_persist.c b/libmpathpersist/mpath_persist.c
> index bd30125..6b6901e 100644
> --- a/libmpathpersist/mpath_persist.c
> +++ b/libmpathpersist/mpath_persist.c
> @@ -585,11 +585,12 @@ int send_prout_activepath(char * dev, int rq_servact, int rq_scope,
>  	rc = pthread_create(&thread, &attr, mpath_prout_pthread_fn, (void *)(&param));
>  	if (rc){
>  		condlog (3, "%s: failed to create thread %d", dev, rc);
> -		exit(-1);
>  	}
> -	/* Free attribute and wait for the other threads */
> -	pthread_attr_destroy(&attr);
> -	rc = pthread_join(thread, NULL);
> +	else {
> +		/* Free attribute and wait for the other threads */
> +		pthread_attr_destroy(&attr);
> +		rc = pthread_join(thread, NULL);
> +	}
>  
>  	return (param.status);
>  }

pthread_attr_destroy() should also be called if pthread_create() fails.

Bart.

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

* Re: [PATCH 3/3] Library with an exit()
  2014-03-09 12:27   ` Bart Van Assche
@ 2014-03-10 22:22     ` Christophe Varoqui
  0 siblings, 0 replies; 5+ messages in thread
From: Christophe Varoqui @ 2014-03-10 22:22 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: Ritesh Raj Sarraf, device-mapper development

Ritesh,

do you want to send an updated patch addressing Bart's comment ?
Patch 1/3 and 2/3 of your set are applied.

Thanks,
Christophe Varoqui

On Sun, Mar 9, 2014 at 1:27 PM, Bart Van Assche <bvanassche@acm.org> wrote:
> On 03/09/14 12:56, Ritesh Raj Sarraf wrote:
>> Signed-off-by: Ritesh Raj Sarraf <rrs@debian.org>
>> ---
>>  libmpathpersist/mpath_persist.c | 9 +++++----
>>  1 file changed, 5 insertions(+), 4 deletions(-)
>>
>> diff --git a/libmpathpersist/mpath_persist.c b/libmpathpersist/mpath_persist.c
>> index bd30125..6b6901e 100644
>> --- a/libmpathpersist/mpath_persist.c
>> +++ b/libmpathpersist/mpath_persist.c
>> @@ -585,11 +585,12 @@ int send_prout_activepath(char * dev, int rq_servact, int rq_scope,
>>       rc = pthread_create(&thread, &attr, mpath_prout_pthread_fn, (void *)(&param));
>>       if (rc){
>>               condlog (3, "%s: failed to create thread %d", dev, rc);
>> -             exit(-1);
>>       }
>> -     /* Free attribute and wait for the other threads */
>> -     pthread_attr_destroy(&attr);
>> -     rc = pthread_join(thread, NULL);
>> +     else {
>> +             /* Free attribute and wait for the other threads */
>> +             pthread_attr_destroy(&attr);
>> +             rc = pthread_join(thread, NULL);
>> +     }
>>
>>       return (param.status);
>>  }
>
> pthread_attr_destroy() should also be called if pthread_create() fails.
>
> Bart.
>
>

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

end of thread, other threads:[~2014-03-10 22:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-09 11:56 [PATCH 1/3] Fix build failure with fomat-security. Specify the format type Ritesh Raj Sarraf
2014-03-09 11:56 ` [PATCH 2/3] Minor spelling error fixes Ritesh Raj Sarraf
2014-03-09 11:56 ` [PATCH 3/3] Library with an exit() Ritesh Raj Sarraf
2014-03-09 12:27   ` Bart Van Assche
2014-03-10 22:22     ` Christophe Varoqui

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.