Author: dgorbachev
Date: Wed Dec 3 11:38:56 2008
New Revision: 37834
URL:
http://svn.reactos.org/svn/reactos?rev=37834&view=rev
Log:
Fix GCC complaints about uninitialized variables (bug #3912).
Modified:
trunk/reactos/lib/rtl/bitmap.c
trunk/reactos/lib/sdk/crt/time/ctime.c
trunk/reactos/ntoskrnl/config/ntapi.c
trunk/reactos/ntoskrnl/ke/bug.c
Modified: trunk/reactos/lib/rtl/bitmap.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/bitmap.c?rev=37834…
==============================================================================
--- trunk/reactos/lib/rtl/bitmap.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/bitmap.c [iso-8859-1] Wed Dec 3 11:38:56 2008
@@ -651,7 +651,8 @@
RtlFindLongestRunClear(PRTL_BITMAP BitMapHeader,
PULONG StartingIndex)
{
- RTL_BITMAP_RUN br;
+ /* GCC complaints that it may be used uninitialized */
+ RTL_BITMAP_RUN br = { 0, 0 };
if (RtlFindClearRuns(BitMapHeader, &br, 1, TRUE) == 1)
{
@@ -670,7 +671,8 @@
RtlFindLongestRunSet(PRTL_BITMAP BitMapHeader,
PULONG StartingIndex)
{
- RTL_BITMAP_RUN br;
+ /* GCC complaints that it may be used uninitialized */
+ RTL_BITMAP_RUN br = { 0, 0 };
if (NTDLL_FindRuns(BitMapHeader, &br, 1, TRUE, NTDLL_FindSetRun) == 1)
{
Modified: trunk/reactos/lib/sdk/crt/time/ctime.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/time/ctime.c?r…
==============================================================================
--- trunk/reactos/lib/sdk/crt/time/ctime.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/time/ctime.c [iso-8859-1] Wed Dec 3 11:38:56 2008
@@ -1276,7 +1276,9 @@
int saved_seconds;
time_t newt;
time_t t;
- struct tm yourtm, mytm;
+
+ /* GCC complaints that it may be used uninitialized */
+ struct tm yourtm, mytm = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
*okayp = FALSE;
yourtm = *tmp;
Modified: trunk/reactos/ntoskrnl/config/ntapi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/ntapi.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/config/ntapi.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/ntapi.c [iso-8859-1] Wed Dec 3 11:38:56 2008
@@ -612,7 +612,11 @@
REG_DELETE_VALUE_KEY_INFORMATION DeleteValueKeyInfo;
REG_POST_OPERATION_INFORMATION PostOperationInfo;
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
- UNICODE_STRING ValueNameCopy = *ValueName;
+
+ /* Workaround for GCC 4.4.0 bug #38271 */
+ UNICODE_STRING ValueNameCopy = { 0, 0, NULL };
+ ValueNameCopy = *ValueName;
+
PAGED_CODE();
/* Verify that the handle is valid and is a registry key */
Modified: trunk/reactos/ntoskrnl/ke/bug.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/bug.c?rev=3783…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/bug.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/bug.c [iso-8859-1] Wed Dec 3 11:38:56 2008
@@ -236,7 +236,9 @@
ULONG i, Addr;
BOOLEAN InSystem;
PVOID p;
- PLDR_DATA_TABLE_ENTRY LdrEntry;
+
+ /* GCC complaints that it may be used uninitialized */
+ PLDR_DATA_TABLE_ENTRY LdrEntry = NULL;
/* Loop them */
for (i = 0; i < FrameCount; i++)