eventlogrpc_s.c:51: warning: 'h' might be used uninitialized

All development related issues welcome

Moderator: Moderator Team

Post Reply
paul
Posts: 48
Joined: Tue Jul 10, 2007 5:58 am

eventlogrpc_s.c:51: warning: 'h' might be used uninitialized

Post by paul »

Hi! I am trying to compile ReactOS on Ubuntu Gutsy by following instructions at http://www.reactos.org/wiki/index.php/H ... buntu_v5.x .

Was working fine until I got:
paul@Arcturus:~/ros-src/reactos$ svn up
At revision 27553.
paul@Arcturus:~/ros-src/reactos$ make
[CC] obj-i386/include/reactos/idl/eventlogrpc_s.c
obj-i386/include/reactos/idl/eventlogrpc_s.c: In function `eventlog_func':
obj-i386/include/reactos/idl/eventlogrpc_s.c:51: warning: 'h' might be used uninitialized in this function
make: *** [obj-i386/include/reactos/idl/eventlogrpc_s.o] Error 1
paul@Arcturus:~/ros-src/reactos$

I don't know how normal it is to get on errors like that on the
current sources. Maybe I just need to wait to tomorrow, and do
a new svn up, then retry?

BTW: Am I at the good place to ask this?

Reacter
Posts: 326
Joined: Tue Feb 06, 2007 9:57 pm
Location: Tornado Alley

Post by Reacter »

Try Colin Finck's version of RosBE for Unix systems.

P.S. : Sorry for misspelling your name. Couldn't spell that day.
Last edited by Reacter on Wed Jul 11, 2007 9:16 pm, edited 1 time in total.
More ReactOS, please!

paul
Posts: 48
Joined: Tue Jul 10, 2007 5:58 am

Post by paul »

For now, I just:
paul@Arcturus:~/ros-src/reactos$ svn diff
Index: ReactOS.rbuild
===================================================================
--- ReactOS.rbuild (revision 27578)
+++ ReactOS.rbuild (working copy)
@@ -56,7 +56,7 @@
</if>
</if>

- <compilerflag>-Wpointer-arith</compilerflag>
+ <compilerflag>-Wpointer-arith -Wno-uninitialized</compilerflag>
<linkerflag>-enable-stdcall-fixup</linkerflag>

<include>.</include>

With that change, I was able to go to the end of 'make'.
Other warnings don't stop make, I don't understand why uninitialed warnings seems to stop make.

Haos
Test Team
Posts: 2954
Joined: Thu Mar 22, 2007 5:42 am
Contact:

Post by Haos »

!Blame GCC (bug 31707 ).

paul
Posts: 48
Joined: Tue Jul 10, 2007 5:58 am

It stop because the assembler is not able to assemble

Post by paul »

I have investigated a bit more:
paul@paul-desktop:~/ros-src/reactos$ make
[CC] obj-i386/include/reactos/idl/eventlogrpc_s.c
Reading specs from /usr/lib/gcc/i586-mingw32msvc/3.4.5/specs
Configured with: /build/buildd/mingw32-3.4.5.20060117.1.dfsg/build_dir/src/gcc-3.4.5-20060117-1-dfsg/configure -v --prefix=/usr --target=i586-mingw32msvc --enable-languages=c,c++ --enable-threads --enable-sjlj-exceptions --disable-multilib --enable-version-specific-runtime-libs
Thread model: win32
gcc version 3.4.5 (mingw special)
/usr/libexec/gcc/i586-mingw32msvc/3.4.5/cc1 -quiet -v -I. -Iw32api/include -I. -Iinclude -Iinclude/psdk -Iobj-i386/include/psdk -Iinclude/dxsdk -Iinclude/crt -Iinclude/ddk -Iinclude/GL -Iinclude/ndk -Iinclude/reactos -Iinclude/reactos/libs -D_X86_ -D_M_IX86 -D_X86_ -D__i386__ -D_REACTOS_ -DDBG -D_SEH_ENABLE_TRACE obj-i386/include/reactos/idl/eventlogrpc_s.c -quiet -dumpbase eventlogrpc_s.c -march=pentium -momit-leaf-frame-pointer -mpreferred-stack-boundary=2 -auxbase-strip obj-i386/include/reactos/idl/eventlogrpc_s.o -g -Os -Wall -Wpointer-arith -Wno-strict-aliasing -Werror -version -ftracer -fno-optimize-sibling-calls -o - |
/usr/lib/gcc/i586-mingw32msvc/3.4.5/../../../../i586-mingw32msvc/bin/as -o obj-i386/include/reactos/idl/eventlogrpc_s.o

cc1 seems to have worked fine (with the warning), but because the assembler (as) was not happy with the work of cc1, their supervisor (make) stopped. At least, that's what I am understanding.

It may have to do with the fact that I ignored:
"and edit makefile.auto , modify the line
nasm := yasm
to
nasm := nasm "?

I begin to doubt that my previous edit of ReactOS.rbuild was the reason I was able to compile all. Maybe the 'make clean' I had make. Not sure, still investigating.

Haos
Test Team
Posts: 2954
Joined: Thu Mar 22, 2007 5:42 am
Contact:

Post by Haos »

You should either fill a bugzilla report (but study the issue first, to rule out the possibility of error on your side) or join irc channel #reactos on irc.freenode.net and speak with the devs.

paul
Posts: 48
Joined: Tue Jul 10, 2007 5:58 am

latest conspiration theory

Post by paul »

Actually, my view on this have change a lot in the last hour.

When ran from make, the job is not done.
I means, I do repetetively make, and it always result on the same error.
Suggesting that the target (.o file) was not generated.

But if I manualy run the command, no problem, the job is done and the .o
file is created.

So next time I do 'make', it progress to the next bug with an error.
From there, repetitively doing make, make no progress.

But, if I do what make say it do, it is done, target generated!

Then I began to wonder, hey, why did adding -WNo-Uninitialized fixed things?
Maybe I added a space? Checked: no.
Then I think: Maybe because by editing ReactOS.rbuild, I had touched it.

And I am there in my investigation...

paul
Posts: 48
Joined: Tue Jul 10, 2007 5:58 am

Post by paul »

I think I have isolated the problem:

paul@paul-desktop:~/ros-src/reactos$ i586-mingw32msvc-gcc -c obj-i386/include/reactos/idl/pnp_s.c -o obj-i386/include/reactos/idl/pnp_s.o -I. -Iw32api/include -D_X86_ -I. -Iinclude -Iinclude/psdk -Iobj-i386/include/psdk -Iinclude/dxsdk -Iinclude/crt -Iinclude/ddk -Iinclude/GL -Iinclude/ndk -Iinclude/reactos -Iinclude/reactos/libs -D_M_IX86 -D_X86_ -D__i386__ -D_REACTOS_ -DDBG -D_SEH_ENABLE_TRACE -Wall -march=pentium -Wpointer-arith -v -Os -Wno-strict-aliasing -ftracer -momit-leaf-frame-pointer -mpreferred-stack-boundary=2 -g -pipe -Werror -fno-optimize-sibling-calls; echo $?

Reading specs from /usr/lib/gcc/i586-mingw32msvc/3.4.5/specs
Configured with: /build/buildd/mingw32-3.4.5.20060117.1.dfsg/build_dir/src/gcc-3.4.5-20060117-1-dfsg/configure -v --prefix=/usr --target=i586-mingw32msvc --enable-languages=c,c++ --enable-threads --enable-sjlj-exceptions --disable-multilib --enable-version-specific-runtime-libs
Thread model: win32
gcc version 3.4.5 (mingw special)
/usr/libexec/gcc/i586-mingw32msvc/3.4.5/cc1 -quiet -v -I. -Iw32api/include -I. -Iinclude -Iinclude/psdk -Iobj-i386/include/psdk -Iinclude/dxsdk -Iinclude/crt -Iinclude/ddk -Iinclude/GL -Iinclude/ndk -Iinclude/reactos -Iinclude/reactos/libs -D_X86_ -D_M_IX86 -D_X86_ -D__i386__ -D_REACTOS_ -DDBG -D_SEH_ENABLE_TRACE obj-i386/include/reactos/idl/pnp_s.c -quiet -dumpbase pnp_s.c -march=pentium -momit-leaf-frame-pointer -mpreferred-stack-boundary=2 -auxbase-strip obj-i386/include/reactos/idl/pnp_s.o -g -Os -Wall -Wpointer-arith -Wno-strict-aliasing -Werror -version -ftracer -fno-optimize-sibling-calls -o - |
/usr/lib/gcc/i586-mingw32msvc/3.4.5/../../../../i586-mingw32msvc/bin/as -o obj-i386/include/reactos/idl/pnp_s.o
ignoring nonexistent directory "/usr/lib/gcc/i586-mingw32msvc/3.4.5/../../../../i586-mingw32msvc/sys-include"
ignoring nonexistent directory "w32api/include"
ignoring duplicate directory "."
#include "..." search starts here:
#include <...> search starts here:
.
include
include/psdk
obj-i386/include/psdk
include/dxsdk
include/crt
include/ddk
include/GL
include/ndk
include/reactos
include/reactos/libs
/usr/lib/gcc/i586-mingw32msvc/3.4.5/include
/usr/lib/gcc/i586-mingw32msvc/3.4.5/../../../../i586-mingw32msvc/include
End of search list.
GNU C version 3.4.5 (mingw special) (i586-mingw32msvc)
compiled by GNU C version 4.1.2 20070106 (prerelease) (Ubuntu 4.1.1-21ubuntu7).
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=128407
obj-i386/include/reactos/idl/pnp_s.c: In function `pnp_PNP_GetVersion':
obj-i386/include/reactos/idl/pnp_s.c:52: warning: 'BindingHandle' might be used uninitialized in this function
1
paul@paul-desktop:~/ros-src/reactos$

Seems it was not able to make the target (.o file).

Now, let's do it ourself, by doing what -v says it does:
paul@paul-desktop:~/ros-src/reactos$ /usr/libexec/gcc/i586-mingw32msvc/3.4.5/cc1 -quiet -v -I. -Iw32api/include -I. -Iinclude -Iinclude/psdk -Iobj-i386/include/psdk -Iinclude/dxsdk -Iinclude/crt -Iinclude/ddk -Iinclude/GL -Iinclude/ndk -Iinclude/reactos -Iinclude/reactos/libs -D_X86_ -D_M_IX86 -D_X86_ -D__i386__ -D_REACTOS_ -DDBG -D_SEH_ENABLE_TRACE obj-i386/include/reactos/idl/pnp_s.c -quiet -dumpbase pnp_s.c -march=pentium -momit-leaf-frame-pointer -mpreferred-stack-boundary=2 -auxbase-strip obj-i386/include/reactos/idl/pnp_s.o -g -Os -Wall -Wpointer-arith -Wno-strict-aliasing -Werror -version -ftracer -fno-optimize-sibling-calls -o - |
> /usr/lib/gcc/i586-mingw32msvc/3.4.5/../../../../i586-mingw32msvc/bin/as -o obj-i386/include/reactos/idl/pnp_s.o; echo $?
ignoring nonexistent directory "/usr/lib/gcc/i586-mingw32msvc/3.4.5/../../../../i586-mingw32msvc/sys-include"
ignoring nonexistent directory "w32api/include"
ignoring duplicate directory "."
#include "..." search starts here:
#include <...> search starts here:
.
include
include/psdk
obj-i386/include/psdk
include/dxsdk
include/crt
include/ddk
include/GL
include/ndk
include/reactos
include/reactos/libs
/usr/lib/gcc/i586-mingw32msvc/3.4.5/include
/usr/lib/gcc/i586-mingw32msvc/3.4.5/../../../../i586-mingw32msvc/include
End of search list.
GNU C version 3.4.5 (mingw special) (i586-mingw32msvc)
compiled by GNU C version 4.1.2 20070106 (prerelease) (Ubuntu 4.1.1-21ubuntu7).
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=128407
obj-i386/include/reactos/idl/pnp_s.c: In function `pnp_PNP_GetVersion':
obj-i386/include/reactos/idl/pnp_s.c:52: warning: 'BindingHandle' might be used uninitialized in this function
0
paul@paul-desktop:~/ros-src/reactos$

Success!
So it looks like a bug in i586-mingw32.

It seems I cannot copy & paste all for strange reasons.
I cannot express the bug discoverd because of an other... issue. :x

paul
Posts: 48
Joined: Tue Jul 10, 2007 5:58 am

Post by paul »

Seems the issue happens when pasting text in a TextBox while using Firefox.

paul@paul-desktop:~/ros-src/reactos$ i586-mingw32msvc-gcc -c obj-i386/include/reactos/idl/eventlogrpc_s.c -o obj-i386/include/reactos/idl/eventlogrpc_s.o -I. -Iw32api/include -D_X86_ -I. -Iinclude -Iinclude/psdk -Iobj-i386/include/psdk -Iinclude/dxsdk -Iinclude/crt -Iinclude/ddk -Iinclude/GL -Iinclude/ndk -Iinclude/reactos -Iinclude/reactos/libs -D_M_IX86 -D_X86_ -D__i386__ -D_REACTOS_ -DDBG -D_SEH_ENABLE_TRACE -Wall -march=pentium -Wpointer-arith -v -Os -Wno-strict-aliasing -ftracer -momit-leaf-frame-pointer -mpreferred-stack-boundary=2 -g -pipe -Werror -fno-optimize-sibling-calls; echo $?

[space added to better separate]
Reading specs from /usr/lib/gcc/i586-mingw32msvc/3.4.5/specs
Configured with: /build/buildd/mingw32-3.4.5.20060117.1.dfsg/build_dir/src/gcc-3.4.5-20060117-1-dfsg/configure -v --prefix=/usr --target=i586-mingw32msvc --enable-languages=c,c++ --enable-threads --enable-sjlj-exceptions --disable-multilib --enable-version-specific-runtime-libs
Thread model: win32
gcc version 3.4.5 (mingw special)
/usr/libexec/gcc/i586-mingw32msvc/3.4.5/cc1 -quiet -v -I. -Iw32api/include -I. -Iinclude -Iinclude/psdk -Iobj-i386/include/psdk -Iinclude/dxsdk -Iinclude/crt -Iinclude/ddk -Iinclude/GL -Iinclude/ndk -Iinclude/reactos -Iinclude/reactos/libs -D_X86_ -D_M_IX86 -D_X86_ -D__i386__ -D_REACTOS_ -DDBG -D_SEH_ENABLE_TRACE obj-i386/include/reactos/idl/eventlogrpc_s.c -quiet -dumpbase eventlogrpc_s.c -march=pentium -momit-leaf-frame-pointer -mpreferred-stack-boundary=2 -auxbase-strip obj-i386/include/reactos/idl/eventlogrpc_s.o -g -Os -Wall -Wpointer-arith -Wno-strict-aliasing -Werror -version -ftracer -fno-optimize-sibling-calls -o - |
/usr/lib/gcc/i586-mingw32msvc/3.4.5/../../../../i586-mingw32msvc/bin/as -o obj-i386/include/reactos/idl/eventlogrpc_s.o
ignoring nonexistent directory "/usr/lib/gcc/i586-mingw32msvc/3.4.5/../../../../i586-mingw32msvc/sys-include"
ignoring nonexistent directory "w32api/include"
ignoring duplicate directory "."
#include "..." search starts here:
#include <...> search starts here:
.
include
include/psdk
obj-i386/include/psdk
include/dxsdk
include/crt
include/ddk
include/GL
include/ndk
include/reactos
include/reactos/libs
/usr/lib/gcc/i586-mingw32msvc/3.4.5/include
/usr/lib/gcc/i586-mingw32msvc/3.4.5/../../../../i586-mingw32msvc/include
End of search list.
GNU C version 3.4.5 (mingw special) (i586-mingw32msvc)
compiled by GNU C version 4.1.2 20070106 (prerelease) (Ubuntu 4.1.1-21ubuntu7).
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=128407
obj-i386/include/reactos/idl/eventlogrpc_s.c: In function `eventlog_func':
obj-i386/include/reactos/idl/eventlogrpc_s.c:51: warning: 'h' might be used uninitialized in this function
1
paul@paul-desktop:~/ros-src/reactos$ ls obj-i386/include/reactos/idl/eventlogrpc_s.o
ls: obj-i386/include/reactos/idl/eventlogrpc_s.o: Aucun fichier ou répertoire de ce type
paul@paul-desktop:~/ros-src/reactos$

And now, when I do what -v says it do:

paul@paul-desktop:~/ros-src/reactos$ /usr/libexec/gcc/i586-mingw32msvc/3.4.5/cc1 -quiet -v -I. -Iw32api/include -I. -Iinclude -Iinclude/psdk -Iobj-i386/include/psdk -Iinclude/dxsdk -Iinclude/crt -Iinclude/ddk -Iinclude/GL -Iinclude/ndk -Iinclude/reactos -Iinclude/reactos/libs -D_X86_ -D_M_IX86 -D_X86_ -D__i386__ -D_REACTOS_ -DDBG -D_SEH_ENABLE_TRACE obj-i386/include/reactos/idl/eventlogrpc_s.c -quiet -dumpbase eventlogrpc_s.c -march=pentium -momit-leaf-frame-pointer -mpreferred-stack-boundary=2 -auxbase-strip obj-i386/include/reactos/idl/eventlogrpc_s.o -g -Os -Wall -Wpointer-arith -Wno-strict-aliasing -Werror -version -ftracer -fno-optimize-sibling-calls -o - |
> /usr/lib/gcc/i586-mingw32msvc/3.4.5/../../../../i586-mingw32msvc/bin/as -o obj-i386/include/reactos/idl/eventlogrpc_s.o ; echo $?
ignoring nonexistent directory "/usr/lib/gcc/i586-mingw32msvc/3.4.5/../../../../i586-mingw32msvc/sys-include"
ignoring nonexistent directory "w32api/include"
ignoring duplicate directory "."
#include "..." search starts here:
#include <...> search starts here:
.
include
include/psdk
obj-i386/include/psdk
include/dxsdk
include/crt
include/ddk
include/GL
include/ndk
include/reactos
include/reactos/libs
/usr/lib/gcc/i586-mingw32msvc/3.4.5/include
/usr/lib/gcc/i586-mingw32msvc/3.4.5/../../../../i586-mingw32msvc/include
End of search list.
GNU C version 3.4.5 (mingw special) (i586-mingw32msvc)
compiled by GNU C version 4.1.2 20070106 (prerelease) (Ubuntu 4.1.1-21ubuntu7).
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=128407
obj-i386/include/reactos/idl/eventlogrpc_s.c: In function `eventlog_func':
obj-i386/include/reactos/idl/eventlogrpc_s.c:51: warning: 'h' might be used uninitialized in this function
0
paul@paul-desktop:~/ros-src/reactos$ ls obj-i386/include/reactos/idl/eventlogrpc_s.o
obj-i386/include/reactos/idl/eventlogrpc_s.o
paul@paul-desktop:~/ros-src/reactos$

cyberkoa
Posts: 17
Joined: Wed Dec 07, 2005 7:39 am

Post by cyberkoa »

I encounter a very similar problem, stop at compiling eventlogrpc_s.c also. At first , I thought my repository are messed up because long time never check out (abt 1 year).

Do a svn cleanup does not solve the problem.

Therefore, I remove all files and do a fresh check out . The same problem still occur.

However, the error message is a bit different , but overall is the uninitialized warning problem. I follow one of the reply , to add in additional compile flag to disable warning and now it passes evenlogrpc_s.c compilation.

I have no much experience in C/C++ & compiler, not sure whether is gcc (mingw-gcc) problem or not.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest