Closed Bug 1745131 Opened 2 years ago Closed 2 years ago

[clang 14] widget/cocoa/nsChildView.mm:4348:7: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]

Categories

(Core :: Widget: Cocoa, defect)

defect

Tracking

()

RESOLVED FIXED
97 Branch
Tracking Status
firefox97 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(1 file)

[task 2021-12-09T07:27:07.872Z] 07:27:07     INFO -  widget/cocoa/nsChildView.o
[task 2021-12-09T07:27:07.877Z] 07:27:07     INFO -  /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang++ --sysroot /builds/worker/fetches/MacOSX10.12.sdk -mmacosx-version-min=10.12 -stdlib=libc++ -std=gnu++17 --target=x86_64-apple-darwin -o nsChildView.o -c  -fvisibility=hidden -fvisibility-inlines-hidden -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -ftrivial-auto-var-init=pattern -DDEBUG=1 -DOS_POSIX=1 -DOS_MACOSX=1 -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/builds/worker/checkouts/gecko/widget/cocoa -I/builds/worker/workspace/obj-build/widget/cocoa -I/builds/worker/workspace/obj-build/ipc/ipdl/_ipdlheaders -I/builds/worker/checkouts/gecko/ipc/chromium/src -I/builds/worker/checkouts/gecko/dom/events -I/builds/worker/checkouts/gecko/dom/media/platforms/apple -I/builds/worker/checkouts/gecko/layout/base -I/builds/worker/checkouts/gecko/layout/forms -I/builds/worker/checkouts/gecko/layout/generic -I/builds/worker/checkouts/gecko/layout/style -I/builds/worker/checkouts/gecko/layout/xul -I/builds/worker/checkouts/gecko/widget -I/builds/worker/checkouts/gecko/widget/headless -I/builds/worker/checkouts/gecko/gfx/skia -I/builds/worker/checkouts/gecko/gfx/skia/skia -I/builds/worker/workspace/obj-build/dist/include -I/builds/worker/workspace/obj-build/dist/include/nspr -I/builds/worker/workspace/obj-build/dist/include/nss -DMOZILLA_CLIENT -include /builds/worker/workspace/obj-build/mozilla-config.h -Qunused-arguments -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wdeprecated-this-capture -Wempty-body -Wformat-type-confusion -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wno-error=tautological-type-limit-compare -Wunreachable-code -Wunreachable-code-return -Wunused-but-set-parameter -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wc++2a-compat -Wcomma -Wenum-compare-conditional -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=free-nonheap-object -Wno-error=return-std-move -Wno-error=atomic-alignment -Wno-error=deprecated-copy -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-psabi -Wno-unknown-warning-option -fno-sized-deallocation -fno-aligned-new -fcrash-diagnostics-dir=/builds/worker/artifacts -fno-exceptions -fno-strict-aliasing -fPIC -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -Xclang -load -Xclang /builds/worker/workspace/obj-build/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O3 -fno-omit-frame-pointer -funwind-tables -Werror  -MD -MP -MF .deps/nsChildView.o.pp   -x objective-c++ -fobjc-exceptions   /builds/worker/checkouts/gecko/widget/cocoa/nsChildView.mm
[task 2021-12-09T07:27:07.877Z] 07:27:07    ERROR -  /builds/worker/checkouts/gecko/widget/cocoa/nsChildView.mm:4348:7: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
[task 2021-12-09T07:27:07.877Z] 07:27:07     INFO -        default:
[task 2021-12-09T07:27:07.877Z] 07:27:07     INFO -        ^
[task 2021-12-09T07:27:07.877Z] 07:27:07     INFO -  /builds/worker/checkouts/gecko/widget/cocoa/nsChildView.mm:4348:7: note: insert 'break;' to avoid fall-through
[task 2021-12-09T07:27:07.877Z] 07:27:07     INFO -        default:
[task 2021-12-09T07:27:07.877Z] 07:27:07     INFO -        ^
[task 2021-12-09T07:27:07.877Z] 07:27:07     INFO -        break;
[task 2021-12-09T07:27:07.877Z] 07:27:07     INFO -  1 error generated.

There is also:

[task 2021-12-09T07:53:34.281Z] 07:53:34    ERROR -  /builds/worker/checkouts/gecko/widget/cocoa/nsNativeThemeCocoa.mm:3321:5: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
[task 2021-12-09T07:53:34.281Z] 07:53:34     INFO -      default:
[task 2021-12-09T07:53:34.281Z] 07:53:34     INFO -      ^
[task 2021-12-09T07:53:34.281Z] 07:53:34     INFO -  /builds/worker/checkouts/gecko/widget/cocoa/nsNativeThemeCocoa.mm:3321:5: note: insert 'break;' to avoid fall-through
[task 2021-12-09T07:53:34.281Z] 07:53:34     INFO -      default:
[task 2021-12-09T07:53:34.281Z] 07:53:34     INFO -      ^
[task 2021-12-09T07:53:34.281Z] 07:53:34     INFO -      break;
[task 2021-12-09T07:53:34.281Z] 07:53:34     INFO -  1 error generated.

Another one:

[task 2021-12-09T22:57:32.382Z] 22:57:32    ERROR -  /builds/worker/checkouts/gecko/widget/cocoa/nsCocoaWindow.mm:933:13: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
[task 2021-12-09T22:57:32.382Z] 22:57:32     INFO -              case nsIWidget::eGenericWindowAnimation:
[task 2021-12-09T22:57:32.382Z] 22:57:32     INFO -              ^
[task 2021-12-09T22:57:32.382Z] 22:57:32     INFO -  /builds/worker/checkouts/gecko/widget/cocoa/nsCocoaWindow.mm:933:13: note: insert 'U_FALLTHROUGH;' to silence this warning
[task 2021-12-09T22:57:32.383Z] 22:57:32     INFO -              case nsIWidget::eGenericWindowAnimation:
[task 2021-12-09T22:57:32.383Z] 22:57:32     INFO -              ^
[task 2021-12-09T22:57:32.383Z] 22:57:32     INFO -              U_FALLTHROUGH;
[task 2021-12-09T22:57:32.383Z] 22:57:32     INFO -  /builds/worker/checkouts/gecko/widget/cocoa/nsCocoaWindow.mm:933:13: note: insert 'break;' to avoid fall-through
[task 2021-12-09T22:57:32.383Z] 22:57:32     INFO -              case nsIWidget::eGenericWindowAnimation:
[task 2021-12-09T22:57:32.383Z] 22:57:32     INFO -              ^
[task 2021-12-09T22:57:32.383Z] 22:57:32     INFO -              break;
[task 2021-12-09T22:57:32.383Z] 22:57:32     INFO -  1 error generated.
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/cb3310854df7
Avoid implicit fallthrough in cocoa widget code. r=spohl
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
Blocks: 1758780
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: