Pārlūkot izejas kodu

extra_opts.c: Fix using result as a condition warnings

See,
extra_opts.c:96:14: warning: using the result of an assignment as a condition
      without parentheses [-Wparentheses]
                                while(ea1=ea1->next) ea_num++;
                                      ~~~^~~~~~~~~~
extra_opts.c:96:14: note: place parentheses around the assignment to silence
      this warning
                                while(ea1=ea1->next) ea_num++;
                                         ^
                                      (            )
extra_opts.c:96:14: note: use '==' to turn this assignment into an equality
      comparison
                                while(ea1=ea1->next) ea_num++;
                                         ^
                                         ==
extra_opts.c:103:14: warning: using the result of an assignment as a condition
      without parentheses [-Wparentheses]
                                while(ea1=ea1->next) ea_num++;
                                      ~~~^~~~~~~~~~
extra_opts.c:103:14: note: place parentheses around the assignment to silence
      this warning
                                while(ea1=ea1->next) ea_num++;
                                         ^
                                      (            )
extra_opts.c:103:14: note: use '==' to turn this assignment into an equality
      comparison
                                while(ea1=ea1->next) ea_num++;
                                         ^
                                         ==
Mario Trangoni 7 gadi atpakaļ
vecāks
revīzija
7bc81fd21e
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      lib/extra_opts.c

+ 2 - 2
lib/extra_opts.c

@@ -93,14 +93,14 @@ char **np_extra_opts(int *argc, char **argv, const char *plugin_name){
 			/* append the list to extra_args */
 			if(extra_args==NULL){
 				extra_args=ea1;
-				while(ea1=ea1->next) ea_num++;
+				while((ea1=ea1->next)) ea_num++;
 			}else{
 				ea_tmp=extra_args;
 				while(ea_tmp->next) {
 					ea_tmp=ea_tmp->next;
 				}
 				ea_tmp->next=ea1;
-				while(ea1=ea1->next) ea_num++;
+				while((ea1=ea1->next)) ea_num++;
 			}
 			ea1=ea_tmp=NULL;
 		}