@@ -61,7 +61,9 @@ int main(int argc, char **argv)
6161 fprintf (stderr , "Client %s:%d universe size %d\n" , myproc .nspace , myproc .rank , nprocs );
6262
6363 /* put a few values */
64- (void )asprintf (& tmp , "%s-%d-internal" , myproc .nspace , myproc .rank );
64+ if (0 > asprintf (& tmp , "%s-%d-internal" , myproc .nspace , myproc .rank )) {
65+ exit (1 );
66+ }
6567 value .type = PMIX_UINT32 ;
6668 value .data .uint32 = 1234 ;
6769 if (PMIX_SUCCESS != (rc = PMIx_Store_internal (& myproc , tmp , & value ))) {
@@ -70,7 +72,9 @@ int main(int argc, char **argv)
7072 }
7173 free (tmp );
7274
73- (void )asprintf (& tmp , "%s-%d-local" , myproc .nspace , myproc .rank );
75+ if (0 > asprintf (& tmp , "%s-%d-local" , myproc .nspace , myproc .rank )) {
76+ exit (1 );
77+ }
7478 value .type = PMIX_UINT64 ;
7579 value .data .uint64 = 1234 ;
7680 if (PMIX_SUCCESS != (rc = PMIx_Put (PMIX_LOCAL , tmp , & value ))) {
@@ -79,7 +83,9 @@ int main(int argc, char **argv)
7983 }
8084 free (tmp );
8185
82- (void )asprintf (& tmp , "%s-%d-remote" , myproc .nspace , myproc .rank );
86+ if (0 > asprintf (& tmp , "%s-%d-remote" , myproc .nspace , myproc .rank )) {
87+ exit (1 );
88+ }
8389 value .type = PMIX_STRING ;
8490 value .data .string = "1234" ;
8591 if (PMIX_SUCCESS != (rc = PMIx_Put (PMIX_REMOTE , tmp , & value ))) {
@@ -108,7 +114,9 @@ int main(int argc, char **argv)
108114
109115 /* check the returned data */
110116 for (n = 0 ; n < nprocs ; n ++ ) {
111- (void )asprintf (& tmp , "%s-%d-local" , myproc .nspace , myproc .rank );
117+ if (0 > asprintf (& tmp , "%s-%d-local" , myproc .nspace , myproc .rank )) {
118+ exit (1 );
119+ }
112120 if (PMIX_SUCCESS != (rc = PMIx_Get (& myproc , tmp , NULL , 0 , & val ))) {
113121 fprintf (stderr , "Client ns %s rank %d: PMIx_Get %s failed: %d\n" , myproc .nspace , myproc .rank , tmp , rc );
114122 goto done ;
@@ -128,7 +136,9 @@ int main(int argc, char **argv)
128136 fprintf (stderr , "Client ns %s rank %d: PMIx_Get %s returned correct\n" , myproc .nspace , myproc .rank , tmp );
129137 PMIX_VALUE_RELEASE (val );
130138 free (tmp );
131- (void )asprintf (& tmp , "%s-%d-remote" , myproc .nspace , myproc .rank );
139+ if (0 > asprintf (& tmp , "%s-%d-remote" , myproc .nspace , myproc .rank )) {
140+ exit (1 );
141+ }
132142 if (PMIX_SUCCESS != (rc = PMIx_Get (& myproc , tmp , NULL , 0 , & val ))) {
133143 fprintf (stderr , "Client ns %s rank %d: PMIx_Get %s failed: %d\n" , myproc .nspace , myproc .rank , tmp , rc );
134144 goto done ;
0 commit comments