Bug 56209 - Uninitialised variables in os/win32/ap_regkey.c
Summary: Uninitialised variables in os/win32/ap_regkey.c
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Runtime Config (show other bugs)
Version: 2.5-HEAD
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-03 18:41 UTC by Flavio Medeiros
Modified: 2014-03-03 18:44 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Flavio Medeiros 2014-03-03 18:41:26 UTC
I'm not sure if we can have configuration not APR_HAS_UNICODE_FS and not APR_HAS_ANSI_FS. In this configuration, the compiler complains about uninitialized variables (exists, hkey, rc, buf, value, bufsize) in functions ap_regkey_open, ap_regkey_value_array_get and ap_regkey_value_array_set.
Comment 1 Flavio Medeiros 2014-03-03 18:44:57 UTC
For example: in function (ap_regkey_open) we have the following code:

#if APR_HAS_UNICODE_FS
    IF_WIN_OS_IS_UNICODE
    {
        // code
    }
#endif /* APR_HAS_UNICODE_FS */
#if APR_HAS_ANSI_FS
    ELSE_WIN_OS_IS_ANSI
    {
        // code
    }
#endif

I believe that we have problems if we define APR_HAS_ANSI_FS without APR_HAS_UNICODE_FS. Also, we have uninitialised variables if we do not define any of them.