I upgraded the source tree of M-C and C-C.
When I tried to build TB on local PC running linux , I got the following error .
```
running: "/usr/bin/ccache" "/usr/bin/gcc-9" "-std=gnu99" "-O1" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-fno-builtin-strlen" "-Wl,--gdb-index" "-Dfdatasync=fdatasync" "-DDEBUG_4GB_CHECK" "-DUSEHELGRIND=1" "-DUSEVALGRIND=1" "-DDEBUG" "-g" "-gsplit-dwarf" "-Werror=sign-compare" "-Werror=unused-result" "-Werror=unused-variable" "-Werror=format" "-I" "glsl-optimizer/include" "-I" "glsl-optimizer/src/mesa" "-I" "glsl-optimizer/src/mapi" "-I" "glsl-optimizer/src/compiler" "-I" "glsl-optimizer/src/compiler/glsl" "-I" "glsl-optimizer/src/gallium/auxiliary" "-I" "glsl-optimizer/src/gallium/include" "-I" "glsl-optimizer/src" "-I" "glsl-optimizer/src/util" "-D__STDC_FORMAT_MACROS" "-DHAVE_ENDIAN_H" "-DHAVE_PTHREAD" "-DHAVE_TIMESPEC_GET" "-o" "/NEW-SSD/moz-obj-dir/objdir-tb3/debug/build/glslopt-2267117f733e84f5/out/glsl-optimizer/src/util/blob.o" "-c" "glsl-optimizer/src/util/blob.c"
cargo:warning=glsl-optimizer/src/util/blob.c: In function ‘ensure_can_read’:
cargo:warning=glsl-optimizer/src/util/blob.c:260:64: error: comparison of integer expressions of different signedness: ‘long int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
cargo:warning= 260 | if (blob->current <= blob->end && blob->end - blob->current >= size)
cargo:warning= | ^~
cargo:warning=cc1: some warnings being treated as errors
exit code: 1
--- stderr
error occurred: Command "/usr/bin/ccache" "/usr/bin/gcc-9" "-std=gnu99" "-O1" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-fno-builtin-strlen" "-Wl,--gdb-index" "-Dfdatasync=fdatasync" "-DDEBUG_4GB_CHECK" "-DUSEHELGRIND=1" "-DUSEVALGRIND=1" "-DDEBUG" "-g" "-gsplit-dwarf" "-Werror=sign-compare" "-Werror=unused-result" "-Werror=unused-variable" "-Werror=format" "-I" "glsl-optimizer/include" "-I" "glsl-optimizer/src/mesa" "-I" "glsl-optimizer/src/mapi" "-I" "glsl-optimizer/src/compiler" "-I" "glsl-optimizer/src/compiler/glsl" "-I" "glsl-optimizer/src/gallium/auxiliary" "-I" "glsl-optimizer/src/gallium/include" "-I" "glsl-optimizer/src" "-I" "glsl-optimizer/src/util" "-D__STDC_FORMAT_MACROS" "-DHAVE_ENDIAN_H" "-DHAVE_PTHREAD" "-DHAVE_TIMESPEC_GET" "-o" "/NEW-SSD/moz-obj-dir/objdir-tb3/debug/build/glslopt-2267117f733e84f5/out/glsl-optimizer/src/util/blob.o" "-c" "glsl-optimizer/src/util/blob.c" with args "gcc-9" did not execute successfully (status code exit code: 1).
```
Please note that I let the rather strict check of "-Werror=sign-compare" in place.
(This was due to a stricter check on mozilla compilation farm some years ago for a particular directory than on the local PC. Thus I got build error on the tryserver while I could build TB locally. Ever since, I simply have decided to let the stricter check on ALL the directories during local build. )
Given that the sign vs unsigned comparison has been a source of many security bugs and general bugs, I would rather see the unsafe expression of sign vs. unsigned comparison.
But for now, I want to avoid the build error by proper type casting. (short of disabling -Werror=sign-compare"?
I looked for blob.c under relevant directories and found blob.c as below.
/NEW-SSD/NREF-COMM-CENTRAL/mozilla/third_party/rust/glslopt/glsl-optimizer/src/util/
/NEW-SSD/NREF-COMM-CENTRAL/mozilla is my M-C source directory.
But when I tried to modify it and build, I got the following error. Note the warning about "[replace]".
```
/usr/bin/ccache /usr/bin/g++-9 -std=gnu++17 -o OSPreferences_gtk.o -c -I/NEW-SSD/moz-obj-dir/objdir-tb3/dist/stl_wrappers -I/NEW-SSD/moz-obj-dir/objdir-tb3/dist/system_wrappers -include /NEW-SSD/NREF-COMM-CENTRAL/mozilla/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DDEBUG=1 -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/NEW-SSD/NREF-COMM-CENTRAL/mozilla/intl/locale/gtk -I/NEW-SSD/moz-obj-dir/objdir-tb3/intl/locale/gtk -I/NEW-SSD/NREF-COMM-CENTRAL/mozilla/intl/locale -I/NEW-SSD/moz-obj-dir/objdir-tb3/dist/include -I/NEW-SSD/moz-obj-dir/objdir-tb3/dist/include/nspr -I/NEW-SSD/moz-obj-dir/objdir-tb3/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /NEW-SSD/moz-obj-dir/objdir-tb3/mozilla-config.h -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wduplicated-cond -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=coverage-mismatch -Wno-error=free-nonheap-object -Wno-multistatement-macros -Wno-error=class-memaccess -Wno-error=deprecated-copy -Wformat -Wformat-overflow=2 -fno-sized-deallocation -fno-aligned-new -fno-builtin-strlen -Wl,--gdb-index -Dfdatasync=fdatasync -DDEBUG_4GB_CHECK -DUSEHELGRIND=1 -DUSEVALGRIND=1 -DDEBUG -g -gsplit-dwarf -Werror=sign-compare -Werror=unused-result -Werror=unused-variable -Werror=format -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -g -O2 -fvar-tracking -gdwarf-4 -fvar-tracking-assignments -freorder-blocks -fno-omit-frame-pointer -funwind-tables -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -MD -MP -MF .deps/OSPreferences_gtk.o.pp -fdiagnostics-color /NEW-SSD/NREF-COMM-CENTRAL/mozilla/intl/locale/gtk/OSPreferences_gtk.cpp
error: the listed checksum of `/NEW-SSD/NREF-COMM-CENTRAL/mozilla/third_party/rust/glslopt/glsl-optimizer/src/util/blob.c` has changed:
expected: 214fea1499bc25eed6eb560651f3358cadbaf507b4ec8bdb8f894c13010ab3f5
actual: 9abe0f8715df6bca8f44eafafe1d9ded8d321a8044c2d6ca518d27e3b6eec099
directory sources are not intended to be edited, if modifications are required then it is recommended that [replace] is used with a forked copy of the source
make[4]: *** [/NEW-SSD/NREF-COMM-CENTRAL/mozilla/config/makefiles/rust.mk:294: force-cargo-library-build] Error 101
```
Obviously, there seems to be a buil-tin check for unintended modification.
I am new to this code.
How can I change the source code to insert proper type casting and still compile it?
TIA
Bug 1633092 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
I upgraded the source tree of M-C and C-C.
When I tried to build TB on local PC running linux , I got the following error .
```
running: "/usr/bin/ccache" "/usr/bin/gcc-9" "-std=gnu99" "-O1" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-fno-builtin-strlen" "-Wl,--gdb-index" "-Dfdatasync=fdatasync" "-DDEBUG_4GB_CHECK" "-DUSEHELGRIND=1" "-DUSEVALGRIND=1" "-DDEBUG" "-g" "-gsplit-dwarf" "-Werror=sign-compare" "-Werror=unused-result" "-Werror=unused-variable" "-Werror=format" "-I" "glsl-optimizer/include" "-I" "glsl-optimizer/src/mesa" "-I" "glsl-optimizer/src/mapi" "-I" "glsl-optimizer/src/compiler" "-I" "glsl-optimizer/src/compiler/glsl" "-I" "glsl-optimizer/src/gallium/auxiliary" "-I" "glsl-optimizer/src/gallium/include" "-I" "glsl-optimizer/src" "-I" "glsl-optimizer/src/util" "-D__STDC_FORMAT_MACROS" "-DHAVE_ENDIAN_H" "-DHAVE_PTHREAD" "-DHAVE_TIMESPEC_GET" "-o" "/NEW-SSD/moz-obj-dir/objdir-tb3/debug/build/glslopt-2267117f733e84f5/out/glsl-optimizer/src/util/blob.o" "-c" "glsl-optimizer/src/util/blob.c"
cargo:warning=glsl-optimizer/src/util/blob.c: In function ‘ensure_can_read’:
cargo:warning=glsl-optimizer/src/util/blob.c:260:64: error: comparison of integer expressions of different signedness: ‘long int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
cargo:warning= 260 | if (blob->current <= blob->end && blob->end - blob->current >= size)
cargo:warning= | ^~
cargo:warning=cc1: some warnings being treated as errors
exit code: 1
--- stderr
error occurred: Command "/usr/bin/ccache" "/usr/bin/gcc-9" "-std=gnu99" "-O1" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-fno-builtin-strlen" "-Wl,--gdb-index" "-Dfdatasync=fdatasync" "-DDEBUG_4GB_CHECK" "-DUSEHELGRIND=1" "-DUSEVALGRIND=1" "-DDEBUG" "-g" "-gsplit-dwarf" "-Werror=sign-compare" "-Werror=unused-result" "-Werror=unused-variable" "-Werror=format" "-I" "glsl-optimizer/include" "-I" "glsl-optimizer/src/mesa" "-I" "glsl-optimizer/src/mapi" "-I" "glsl-optimizer/src/compiler" "-I" "glsl-optimizer/src/compiler/glsl" "-I" "glsl-optimizer/src/gallium/auxiliary" "-I" "glsl-optimizer/src/gallium/include" "-I" "glsl-optimizer/src" "-I" "glsl-optimizer/src/util" "-D__STDC_FORMAT_MACROS" "-DHAVE_ENDIAN_H" "-DHAVE_PTHREAD" "-DHAVE_TIMESPEC_GET" "-o" "/NEW-SSD/moz-obj-dir/objdir-tb3/debug/build/glslopt-2267117f733e84f5/out/glsl-optimizer/src/util/blob.o" "-c" "glsl-optimizer/src/util/blob.c" with args "gcc-9" did not execute successfully (status code exit code: 1).
```
Please note that I let the rather strict check of "-Werror=sign-compare" in place.
(This was due to a stricter check on mozilla compilation farm some years ago for a particular directory than on the local PC. Thus I got build error on the tryserver while I could build TB locally. Ever since, I simply have decided to let the stricter check on ALL the directories during local build. )
Given that the sign vs unsigned comparison has been a source of many security bugs and general bugs, I would rather see the unsafe expression of sign vs. unsigned comparison.
But for now, I want to avoid the build error by proper type casting. (short of disabling -Werror=sign-compare")
I looked for blob.c under relevant directories and found blob.c as below.
/NEW-SSD/NREF-COMM-CENTRAL/mozilla/third_party/rust/glslopt/glsl-optimizer/src/util/
/NEW-SSD/NREF-COMM-CENTRAL/mozilla is my M-C source directory.
But when I tried to modify it and build, I got the following error. Note the warning about "[replace]".
```
/usr/bin/ccache /usr/bin/g++-9 -std=gnu++17 -o OSPreferences_gtk.o -c -I/NEW-SSD/moz-obj-dir/objdir-tb3/dist/stl_wrappers -I/NEW-SSD/moz-obj-dir/objdir-tb3/dist/system_wrappers -include /NEW-SSD/NREF-COMM-CENTRAL/mozilla/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DDEBUG=1 -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/NEW-SSD/NREF-COMM-CENTRAL/mozilla/intl/locale/gtk -I/NEW-SSD/moz-obj-dir/objdir-tb3/intl/locale/gtk -I/NEW-SSD/NREF-COMM-CENTRAL/mozilla/intl/locale -I/NEW-SSD/moz-obj-dir/objdir-tb3/dist/include -I/NEW-SSD/moz-obj-dir/objdir-tb3/dist/include/nspr -I/NEW-SSD/moz-obj-dir/objdir-tb3/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /NEW-SSD/moz-obj-dir/objdir-tb3/mozilla-config.h -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wduplicated-cond -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=coverage-mismatch -Wno-error=free-nonheap-object -Wno-multistatement-macros -Wno-error=class-memaccess -Wno-error=deprecated-copy -Wformat -Wformat-overflow=2 -fno-sized-deallocation -fno-aligned-new -fno-builtin-strlen -Wl,--gdb-index -Dfdatasync=fdatasync -DDEBUG_4GB_CHECK -DUSEHELGRIND=1 -DUSEVALGRIND=1 -DDEBUG -g -gsplit-dwarf -Werror=sign-compare -Werror=unused-result -Werror=unused-variable -Werror=format -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -g -O2 -fvar-tracking -gdwarf-4 -fvar-tracking-assignments -freorder-blocks -fno-omit-frame-pointer -funwind-tables -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -MD -MP -MF .deps/OSPreferences_gtk.o.pp -fdiagnostics-color /NEW-SSD/NREF-COMM-CENTRAL/mozilla/intl/locale/gtk/OSPreferences_gtk.cpp
error: the listed checksum of `/NEW-SSD/NREF-COMM-CENTRAL/mozilla/third_party/rust/glslopt/glsl-optimizer/src/util/blob.c` has changed:
expected: 214fea1499bc25eed6eb560651f3358cadbaf507b4ec8bdb8f894c13010ab3f5
actual: 9abe0f8715df6bca8f44eafafe1d9ded8d321a8044c2d6ca518d27e3b6eec099
directory sources are not intended to be edited, if modifications are required then it is recommended that [replace] is used with a forked copy of the source
make[4]: *** [/NEW-SSD/NREF-COMM-CENTRAL/mozilla/config/makefiles/rust.mk:294: force-cargo-library-build] Error 101
```
Obviously, there seems to be a built-in check for unintended modification.
I am new to this code.
How can I change the source code to insert proper type casting and still compile it without the consistency check kicking in?
```
if (blob->current <= blob->end && (size_t) (blob->end - blob->current) >= size)
```
TIA
I upgraded the source tree of M-C and C-C.
When I tried to build TB on local PC running linux , I got the following error .
```
running: "/usr/bin/ccache" "/usr/bin/gcc-9" "-std=gnu99" "-O1" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-fno-builtin-strlen" "-Wl,--gdb-index" "-Dfdatasync=fdatasync" "-DDEBUG_4GB_CHECK" "-DUSEHELGRIND=1" "-DUSEVALGRIND=1" "-DDEBUG" "-g" "-gsplit-dwarf" "-Werror=sign-compare" "-Werror=unused-result" "-Werror=unused-variable" "-Werror=format" "-I" "glsl-optimizer/include" "-I" "glsl-optimizer/src/mesa" "-I" "glsl-optimizer/src/mapi" "-I" "glsl-optimizer/src/compiler" "-I" "glsl-optimizer/src/compiler/glsl" "-I" "glsl-optimizer/src/gallium/auxiliary" "-I" "glsl-optimizer/src/gallium/include" "-I" "glsl-optimizer/src" "-I" "glsl-optimizer/src/util" "-D__STDC_FORMAT_MACROS" "-DHAVE_ENDIAN_H" "-DHAVE_PTHREAD" "-DHAVE_TIMESPEC_GET" "-o" "/NEW-SSD/moz-obj-dir/objdir-tb3/debug/build/glslopt-2267117f733e84f5/out/glsl-optimizer/src/util/blob.o" "-c" "glsl-optimizer/src/util/blob.c"
cargo:warning=glsl-optimizer/src/util/blob.c: In function ‘ensure_can_read’:
cargo:warning=glsl-optimizer/src/util/blob.c:260:64: error: comparison of integer expressions of different signedness: ‘long int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
cargo:warning= 260 | if (blob->current <= blob->end && blob->end - blob->current >= size)
cargo:warning= | ^~
cargo:warning=cc1: some warnings being treated as errors
exit code: 1
--- stderr
error occurred: Command "/usr/bin/ccache" "/usr/bin/gcc-9" "-std=gnu99" "-O1" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-fno-builtin-strlen" "-Wl,--gdb-index" "-Dfdatasync=fdatasync" "-DDEBUG_4GB_CHECK" "-DUSEHELGRIND=1" "-DUSEVALGRIND=1" "-DDEBUG" "-g" "-gsplit-dwarf" "-Werror=sign-compare" "-Werror=unused-result" "-Werror=unused-variable" "-Werror=format" "-I" "glsl-optimizer/include" "-I" "glsl-optimizer/src/mesa" "-I" "glsl-optimizer/src/mapi" "-I" "glsl-optimizer/src/compiler" "-I" "glsl-optimizer/src/compiler/glsl" "-I" "glsl-optimizer/src/gallium/auxiliary" "-I" "glsl-optimizer/src/gallium/include" "-I" "glsl-optimizer/src" "-I" "glsl-optimizer/src/util" "-D__STDC_FORMAT_MACROS" "-DHAVE_ENDIAN_H" "-DHAVE_PTHREAD" "-DHAVE_TIMESPEC_GET" "-o" "/NEW-SSD/moz-obj-dir/objdir-tb3/debug/build/glslopt-2267117f733e84f5/out/glsl-optimizer/src/util/blob.o" "-c" "glsl-optimizer/src/util/blob.c" with args "gcc-9" did not execute successfully (status code exit code: 1).
```
Please note that I let the rather strict check of "-Werror=sign-compare" in place.
(This was due to a stricter check on mozilla compilation farm some years ago for a particular directory than on the local PC. Thus I got build error on the tryserver while I could build TB locally. Ever since, I simply have decided to let the stricter check on ALL the directories during local build. )
Given that the sign vs unsigned comparison has been a source of many security bugs and general bugs, I would rather see the unsafe expression of sign vs. unsigned comparison GO AWAY (go away was missing in the origina post.!)
But for now, I want to avoid the build error by proper type casting. (short of disabling -Werror=sign-compare")
I looked for blob.c under relevant directories and found blob.c as below.
/NEW-SSD/NREF-COMM-CENTRAL/mozilla/third_party/rust/glslopt/glsl-optimizer/src/util/
/NEW-SSD/NREF-COMM-CENTRAL/mozilla is my M-C source directory.
But when I tried to modify it and build, I got the following error. Note the warning about "[replace]".
```
/usr/bin/ccache /usr/bin/g++-9 -std=gnu++17 -o OSPreferences_gtk.o -c -I/NEW-SSD/moz-obj-dir/objdir-tb3/dist/stl_wrappers -I/NEW-SSD/moz-obj-dir/objdir-tb3/dist/system_wrappers -include /NEW-SSD/NREF-COMM-CENTRAL/mozilla/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DDEBUG=1 -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/NEW-SSD/NREF-COMM-CENTRAL/mozilla/intl/locale/gtk -I/NEW-SSD/moz-obj-dir/objdir-tb3/intl/locale/gtk -I/NEW-SSD/NREF-COMM-CENTRAL/mozilla/intl/locale -I/NEW-SSD/moz-obj-dir/objdir-tb3/dist/include -I/NEW-SSD/moz-obj-dir/objdir-tb3/dist/include/nspr -I/NEW-SSD/moz-obj-dir/objdir-tb3/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /NEW-SSD/moz-obj-dir/objdir-tb3/mozilla-config.h -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wduplicated-cond -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=coverage-mismatch -Wno-error=free-nonheap-object -Wno-multistatement-macros -Wno-error=class-memaccess -Wno-error=deprecated-copy -Wformat -Wformat-overflow=2 -fno-sized-deallocation -fno-aligned-new -fno-builtin-strlen -Wl,--gdb-index -Dfdatasync=fdatasync -DDEBUG_4GB_CHECK -DUSEHELGRIND=1 -DUSEVALGRIND=1 -DDEBUG -g -gsplit-dwarf -Werror=sign-compare -Werror=unused-result -Werror=unused-variable -Werror=format -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -g -O2 -fvar-tracking -gdwarf-4 -fvar-tracking-assignments -freorder-blocks -fno-omit-frame-pointer -funwind-tables -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -MD -MP -MF .deps/OSPreferences_gtk.o.pp -fdiagnostics-color /NEW-SSD/NREF-COMM-CENTRAL/mozilla/intl/locale/gtk/OSPreferences_gtk.cpp
error: the listed checksum of `/NEW-SSD/NREF-COMM-CENTRAL/mozilla/third_party/rust/glslopt/glsl-optimizer/src/util/blob.c` has changed:
expected: 214fea1499bc25eed6eb560651f3358cadbaf507b4ec8bdb8f894c13010ab3f5
actual: 9abe0f8715df6bca8f44eafafe1d9ded8d321a8044c2d6ca518d27e3b6eec099
directory sources are not intended to be edited, if modifications are required then it is recommended that [replace] is used with a forked copy of the source
make[4]: *** [/NEW-SSD/NREF-COMM-CENTRAL/mozilla/config/makefiles/rust.mk:294: force-cargo-library-build] Error 101
```
Obviously, there seems to be a built-in check for unintended modification.
I am new to this code.
How can I change the source code to insert proper type casting and still compile it without the consistency check kicking in?
```
if (blob->current <= blob->end && (size_t) (blob->end - blob->current) >= size)
```
TIA