| 
 | 1 | +Error: CPPCHECK_WARNING (CWE-685):  | 
 | 2 | +kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:672: error[wrongPrintfScanfArgNum]: printf format string requires 7 parameters but only 4 are given.  | 
 | 3 | +#  670|     | 
 | 4 | +#  671|   		snprintf(str, sizeof(str), "cpu:%d", i);  | 
 | 5 | +#  672|-> 		print_default("    %-18s " FMT_COLUMNf FMT_COLUMNf FMT_COLUMNf  | 
 | 6 | +#  673|   			      "\n",  | 
 | 7 | +#  674|   			      str, PPS(pps), DROP(drop), ERR(err));  | 
 | 8 | + | 
 | 9 | +Error: CPPCHECK_WARNING (CWE-685):  | 
 | 10 | +kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:717: error[wrongPrintfScanfArgNum]: printf format string requires 7 parameters but only 5 are given.  | 
 | 11 | +#  715|   				err = pps / err; /* calc average bulk size */  | 
 | 12 | +#  716|     | 
 | 13 | +#  717|-> 			print_err(drop,  | 
 | 14 | +#  718|   				  "  %-20s " FMT_COLUMNf FMT_COLUMNf __COLUMN(  | 
 | 15 | +#  719|   					  ".2f") "\n",  | 
 | 16 | + | 
 | 17 | +Error: CPPCHECK_WARNING (CWE-685):  | 
 | 18 | +kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:737: error[wrongPrintfScanfArgNum]: printf format string requires 7 parameters but only 5 are given.  | 
 | 19 | +#  735|   			if (err > 0)  | 
 | 20 | +#  736|   				err = pps / err; /* calc average bulk size */  | 
 | 21 | +#  737|-> 			print_default(  | 
 | 22 | +#  738|   				"    %-18s " FMT_COLUMNf FMT_COLUMNf __COLUMN(  | 
 | 23 | +#  739|   					".2f") "\n",  | 
 | 24 | + | 
 | 25 | +Error: CPPCHECK_WARNING (CWE-685):  | 
 | 26 | +kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:761: error[wrongPrintfScanfArgNum]: printf format string requires 7 parameters but only 4 are given.  | 
 | 27 | +#  759|   		     &xdp_redirect, t);  | 
 | 28 | +#  760|   	if (xdp_pass || xdp_drop || xdp_redirect) {  | 
 | 29 | +#  761|-> 		print_err(xdp_drop,  | 
 | 30 | +#  762|   			  "    %-18s " FMT_COLUMNf FMT_COLUMNf FMT_COLUMNf "\n",  | 
 | 31 | +#  763|   			  "xdp_stats", PASS(xdp_pass), DROP(xdp_drop),  | 
 | 32 | + | 
 | 33 | +Error: CPPCHECK_WARNING (CWE-685):  | 
 | 34 | +kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:777: error[wrongPrintfScanfArgNum]: printf format string requires 7 parameters but only 4 are given.  | 
 | 35 | +#  775|     | 
 | 36 | +#  776|   		snprintf(str, sizeof(str), "cpu:%d", i);  | 
 | 37 | +#  777|-> 		print_default("      %-16s " FMT_COLUMNf FMT_COLUMNf FMT_COLUMNf  | 
 | 38 | +#  778|   			      "\n",  | 
 | 39 | +#  779|   			      str, PASS(xdp_pass), DROP(xdp_drop),  | 
 | 40 | + | 
 | 41 | +Error: CPPCHECK_WARNING (CWE-685):  | 
 | 42 | +kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:800: error[wrongPrintfScanfArgNum]: printf format string requires 7 parameters but only 5 are given.  | 
 | 43 | +#  798|   	err = calc_errs_pps(&rec->total, &prev->total, t);  | 
 | 44 | +#  799|     | 
 | 45 | +#  800|-> 	print_err(drop, "  %-20s " FMT_COLUMNf FMT_COLUMNf FMT_COLUMNf "\n",  | 
 | 46 | +#  801|   		  pps ? "kthread total" : "kthread", PPS(pps), DROP(drop), err,  | 
 | 47 | +#  802|   		  "sched");  | 
 | 48 | + | 
 | 49 | +Error: CPPCHECK_WARNING (CWE-685):  | 
 | 50 | +kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:816: error[wrongPrintfScanfArgNum]: printf format string requires 7 parameters but only 5 are given.  | 
 | 51 | +#  814|     | 
 | 52 | +#  815|   		snprintf(str, sizeof(str), "cpu:%d", i);  | 
 | 53 | +#  816|-> 		print_default("    %-18s " FMT_COLUMNf FMT_COLUMNf FMT_COLUMNf  | 
 | 54 | +#  817|   			      "\n",  | 
 | 55 | +#  818|   			      str, PPS(pps), DROP(drop), err, "sched");  | 
 | 56 | + | 
 | 57 | +Error: CPPCHECK_WARNING (CWE-685):  | 
 | 58 | +kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:844: error[wrongPrintfScanfArgNum]: printf format string requires 3 parameters but only 2 are given.  | 
 | 59 | +#  842|     | 
 | 60 | +#  843|   		snprintf(str, sizeof(str), "cpu:%d", i);  | 
 | 61 | +#  844|-> 		print_default("    %-18s " FMT_COLUMNf "\n", str, REDIR(pps));  | 
 | 62 | +#  845|   	}  | 
 | 63 | +#  846|     | 
 | 64 | + | 
 | 65 | +Error: CPPCHECK_WARNING (CWE-685):  | 
 | 66 | +kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:876: error[wrongPrintfScanfArgNum]: printf format string requires 3 parameters but only 2 are given.  | 
 | 67 | +#  874|   								       "%s",  | 
 | 68 | +#  875|   				 xdp_redirect_err_names[rec_i]);  | 
 | 69 | +#  876|-> 			print_err(drop, "    %-18s " FMT_COLUMNf "\n", str,  | 
 | 70 | +#  877|   				  ERR(drop));  | 
 | 71 | +#  878|   		}  | 
 | 72 | + | 
 | 73 | +Error: CPPCHECK_WARNING (CWE-685):  | 
 | 74 | +kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:890: error[wrongPrintfScanfArgNum]: printf format string requires 3 parameters but only 2 are given.  | 
 | 75 | +#  888|     | 
 | 76 | +#  889|   			snprintf(str, sizeof(str), "cpu:%d", i);  | 
 | 77 | +#  890|-> 			print_default("       %-16s" FMT_COLUMNf "\n", str,  | 
 | 78 | +#  891|   				      ERR(drop));  | 
 | 79 | +#  892|   		}  | 
 | 80 | + | 
 | 81 | +Error: CPPCHECK_WARNING (CWE-685):  | 
 | 82 | +kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:922: error[wrongPrintfScanfArgNum]: printf format string requires 3 parameters but only 2 are given.  | 
 | 83 | +#  920|     | 
 | 84 | +#  921|   		if (drop > 0 && !out) {  | 
 | 85 | +#  922|-> 			print_always("    %-18s " FMT_COLUMNf "\n",  | 
 | 86 | +#  923|   				     action2str(rec_i), ERR(drop));  | 
 | 87 | +#  924|     | 
 | 88 | + | 
 | 89 | +Error: CPPCHECK_WARNING (CWE-685):  | 
 | 90 | +kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:936: error[wrongPrintfScanfArgNum]: printf format string requires 3 parameters but only 2 are given.  | 
 | 91 | +#  934|     | 
 | 92 | +#  935|   				snprintf(str, sizeof(str), "cpu:%d", i);  | 
 | 93 | +#  936|-> 				print_default("       %-16s" FMT_COLUMNf "\n",  | 
 | 94 | +#  937|   					      str, ERR(drop));  | 
 | 95 | +#  938|   			}  | 
 | 96 | + | 
 | 97 | +Error: CPPCHECK_WARNING (CWE-685):  | 
 | 98 | +kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:977: error[wrongPrintfScanfArgNum]: printf format string requires 9 parameters but only 7 are given.  | 
 | 99 | +#  975|   		if (info > 0)  | 
 | 100 | +#  976|   			info = (pps + drop) / info; /* calc avg bulk */  | 
 | 101 | +#  977|-> 		print_default("     %-18s" FMT_COLUMNf FMT_COLUMNf FMT_COLUMNf  | 
 | 102 | +#  978|   				      __COLUMN(".2f") "\n",  | 
 | 103 | +#  979|   			      str, XMIT(pps), DROP(drop), err, "drv_err/s",  | 
 | 104 | + | 
 | 105 | +Error: CPPCHECK_WARNING (CWE-685):  | 
 | 106 | +kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:1070: error[wrongPrintfScanfArgNum]: printf format string requires 9 parameters but only 7 are given.  | 
 | 107 | +# 1068|   		/* Skip idle streams of redirection */  | 
 | 108 | +# 1069|   		if (pps || drop || err) {  | 
 | 109 | +# 1070|-> 			print_err(drop,  | 
 | 110 | +# 1071|   				  "  %-20s " FMT_COLUMNf FMT_COLUMNf FMT_COLUMNf  | 
 | 111 | +# 1072|   				  __COLUMN(".2f") "\n", str, XMIT(pps), DROP(drop),  | 
 | 112 | + | 
 | 113 | +Error: CPPCHECK_WARNING (CWE-685):  | 
 | 114 | +kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:1095: error[wrongPrintfScanfArgNum]: printf format string requires 9 parameters but only 7 are given.  | 
 | 115 | +# 1093|   				info = (pps + drop) / info; /* calc avg bulk */  | 
 | 116 | +# 1094|     | 
 | 117 | +# 1095|-> 			print_default("     %-18s" FMT_COLUMNf FMT_COLUMNf FMT_COLUMNf  | 
 | 118 | +# 1096|   				      __COLUMN(".2f") "\n", str, XMIT(pps),  | 
 | 119 | +# 1097|   				      DROP(drop), err, "drv_err/s", info, "bulk-avg");  | 
 | 120 | + | 
 | 121 | +Error: CPPCHECK_WARNING (CWE-685):  | 
 | 122 | +kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:1110: error[wrongPrintfScanfArgNum]: printf format string requires 2 parameters but only 1 is given.  | 
 | 123 | +# 1108|   	print_always("%-23s", prefix ?: "Summary");  | 
 | 124 | +# 1109|   	if (mask & SAMPLE_RX_CNT)  | 
 | 125 | +# 1110|-> 		print_always(FMT_COLUMNl, RX(out->totals.rx));  | 
 | 126 | +# 1111|   	if (mask & SAMPLE_REDIRECT_CNT)  | 
 | 127 | +# 1112|   		print_always(FMT_COLUMNl, REDIR(out->totals.redir));  | 
 | 128 | + | 
 | 129 | +Error: CPPCHECK_WARNING (CWE-685):  | 
 | 130 | +kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:1112: error[wrongPrintfScanfArgNum]: printf format string requires 2 parameters but only 1 is given.  | 
 | 131 | +# 1110|   		print_always(FMT_COLUMNl, RX(out->totals.rx));  | 
 | 132 | +# 1111|   	if (mask & SAMPLE_REDIRECT_CNT)  | 
 | 133 | +# 1112|-> 		print_always(FMT_COLUMNl, REDIR(out->totals.redir));  | 
 | 134 | +# 1113|   	printf(FMT_COLUMNl,  | 
 | 135 | +# 1114|   	       out->totals.err + out->totals.drop + out->totals.drop_xmit,  | 
 | 136 | + | 
 | 137 | +Error: CPPCHECK_WARNING (CWE-685):  | 
 | 138 | +kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:1125: error[wrongPrintfScanfArgNum]: printf format string requires 7 parameters but only 4 are given.  | 
 | 139 | +# 1123|   				    "receive total" :  | 
 | 140 | +# 1124|   				    "receive";  | 
 | 141 | +# 1125|-> 		print_err((out->rx_cnt.err || out->rx_cnt.drop),  | 
 | 142 | +# 1126|   			  "  %-20s " FMT_COLUMNl FMT_COLUMNl FMT_COLUMNl "\n",  | 
 | 143 | +# 1127|   			  str, PPS(out->rx_cnt.pps), DROP(out->rx_cnt.drop),  | 
 | 144 | + | 
 | 145 | +Error: CPPCHECK_WARNING (CWE-685):  | 
 | 146 | +kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:1143: error[wrongPrintfScanfArgNum]: printf format string requires 3 parameters but only 2 are given.  | 
 | 147 | +# 1141|   	if (mask & SAMPLE_REDIRECT_CNT) {  | 
 | 148 | +# 1142|   		str = out->redir_cnt.suc ? "redirect total" : "redirect";  | 
 | 149 | +# 1143|-> 		print_default("  %-20s " FMT_COLUMNl "\n", str,  | 
 | 150 | +# 1144|   			      REDIR(out->redir_cnt.suc));  | 
 | 151 | +# 1145|     | 
 | 152 | + | 
 | 153 | +Error: CPPCHECK_WARNING (CWE-685):  | 
 | 154 | +kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:1153: error[wrongPrintfScanfArgNum]: printf format string requires 3 parameters but only 2 are given.  | 
 | 155 | +# 1151|   				    "redirect_err total" :  | 
 | 156 | +# 1152|   				    "redirect_err";  | 
 | 157 | +# 1153|-> 		print_err(out->redir_cnt.err, "  %-20s " FMT_COLUMNl "\n", str,  | 
 | 158 | +# 1154|   			  ERR(out->redir_cnt.err));  | 
 | 159 | +# 1155|     | 
 | 160 | + | 
 | 161 | +Error: CPPCHECK_WARNING (CWE-685):  | 
 | 162 | +kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:1163: error[wrongPrintfScanfArgNum]: printf format string requires 3 parameters but only 2 are given.  | 
 | 163 | +# 1161|   						   "xdp_exception";  | 
 | 164 | +# 1162|     | 
 | 165 | +# 1163|-> 		print_err(out->except_cnt.hits, "  %-20s " FMT_COLUMNl "\n", str,  | 
 | 166 | +# 1164|   			  HITS(out->except_cnt.hits));  | 
 | 167 | +# 1165|     | 
 | 168 | + | 
 | 169 | +Error: CPPCHECK_WARNING (CWE-685):  | 
 | 170 | +kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:1174: error[wrongPrintfScanfArgNum]: printf format string requires 9 parameters but only 7 are given.  | 
 | 171 | +# 1172|   				    "devmap_xmit";  | 
 | 172 | +# 1173|     | 
 | 173 | +# 1174|-> 		print_err(out->xmit_cnt.err || out->xmit_cnt.drop,  | 
 | 174 | +# 1175|   			  "  %-20s " FMT_COLUMNl FMT_COLUMNl FMT_COLUMNl  | 
 | 175 | +# 1176|   				  __COLUMN(".2f") "\n",  | 
 | 176 | + | 
 | 177 | +Error: CPPCHECK_WARNING (CWE-562):  | 
 | 178 | +kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/tools/testing/selftests/bpf/progs/cgrp_kfunc_common.h:39: error[returnDanglingLifetime]: Returning pointer to local variable 'id' that will be invalid when returning.  | 
 | 179 | +#   37|   		return NULL;  | 
 | 180 | +#   38|     | 
 | 181 | +#   39|-> 	return bpf_map_lookup_elem(&__cgrps_kfunc_map, &id);  | 
 | 182 | +#   40|   }  | 
 | 183 | +#   41|     | 
 | 184 | + | 
 | 185 | +Error: CPPCHECK_WARNING (CWE-562):  | 
 | 186 | +kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/tools/testing/selftests/bpf/progs/cpumask_common.h:96: error[returnDanglingLifetime]: Returning pointer to local variable 'key' that will be invalid when returning.  | 
 | 187 | +#   94|   	u32 key = 0;  | 
 | 188 | +#   95|     | 
 | 189 | +#   96|-> 	return bpf_map_lookup_elem(&__cpumask_map, &key);  | 
 | 190 | +#   97|   }  | 
 | 191 | +#   98|     | 
 | 192 | + | 
 | 193 | +Error: CPPCHECK_WARNING (CWE-562):  | 
 | 194 | +kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/tools/testing/selftests/bpf/progs/task_kfunc_common.h:38: error[returnDanglingLifetime]: Returning pointer to local variable 'pid' that will be invalid when returning.  | 
 | 195 | +#   36|   		return NULL;  | 
 | 196 | +#   37|     | 
 | 197 | +#   38|-> 	return bpf_map_lookup_elem(&__tasks_kfunc_map, &pid);  | 
 | 198 | +#   39|   }  | 
 | 199 | +#   40|     | 
0 commit comments