You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# cd f-stack/lib
# make
cc -c -O2 -fno-strict-aliasing -frename-registers -pipe -Wno-maybe-uninitialized -std=c99 -Wall -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-inline -Wcast-qual -Wno-pointer-sign -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unused-but-set-variable -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -DFSTACK -fstack-protector -D__FreeBSD__ -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-builtin -I/home/liwei/src/f-stack/lib/include -undef -imacros filtered_predefined_macros.h -nostdinc -I. -I/home/liwei/src/f-stack/lib/../freebsd -I./machine_include -I./opt -Werror -Wno-unused-variable /home/liwei/src/f-stack/lib/../freebsd/netinet/cc/cc_cubic.c
/home/liwei/src/f-stack/lib/../freebsd/netinet/cc/cc_cubic.c: In function ‘cubic_cong_signal’:
/home/liwei/src/f-stack/lib/../freebsd/netinet/cc/cc_cubic.c:264:3: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
if (CCV(ccv, t_rxtshift) >= 2)
^~
/home/liwei/src/f-stack/lib/../freebsd/netinet/cc/cc_cubic.c:266:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
cubic_data->t_last_cong = ticks;
^~~~~~~~~~
cc1: all warnings being treated as errors
Makefile:382: recipe for target 'cc_cubic.o' failed
make: *** [cc_cubic.o] Error 1
It seems newer version gcc added [-Werror=misleading-indentation] error checking,
I can fix this with following patch:
diff --git a/freebsd/netinet/cc/cc_cubic.c b/freebsd/netinet/cc/cc_cubic.c
index a447345..89e35f8 100644
--- a/freebsd/netinet/cc/cc_cubic.c
+++ b/freebsd/netinet/cc/cc_cubic.c
@@ -261,9 +261,10 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type)
* chance the first one is a false alarm and may not indicate
* congestion.
*/
- if (CCV(ccv, t_rxtshift) >= 2)
+ if (CCV(ccv, t_rxtshift) >= 2) {
cubic_data->num_cong_events++;
cubic_data->t_last_cong = ticks;
+ }
break;
}
}
The text was updated successfully, but these errors were encountered:
It seems newer version gcc added
[-Werror=misleading-indentation]
error checking,I can fix this with following patch:
The text was updated successfully, but these errors were encountered: