Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-3385

LP:385648 - Visual C++ Compile error on storage/maria/ma_rt_index.c

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Compiler: Visual C++ 2008 Express

      Problem: Visual Studio generates the following errors due a variable declaration after an assignment.
      ------ Build started: Project: maria, Configuration: Release Win32 ------
      Compiling...
      ma_rt_index.c
      .\ma_rt_index.c(1141) : error C2275: 'uchar' : illegal use of this type as an expression
      C:\My Projects\maria\include\my_global.h(996) : see declaration of 'uchar'
      .\ma_rt_index.c(1141) : error C2065: 'page_buf' : undeclared identifier
      .\ma_rt_index.c(1142) : error C2275: 'MARIA_PAGE' : illegal use of this type as an expression
      c:\my projects\maria\storage\maria\maria_def.h(821) : see declaration of 'MARIA_PAGE'
      .\ma_rt_index.c(1142) : error C2146: syntax error : missing ';' before identifier 'page'
      .\ma_rt_index.c(1142) : error C2065: 'page' : undeclared identifier
      .\ma_rt_index.c(1146) : error C2065: 'page_buf' : undeclared identifier

      (repeating and related errors cut)

      Build log was saved at "file://c:\My Projects\maria\storage\maria\maria.dir\Release\BuildLog.htm"
      maria - 31 error(s), 5 warning(s)
      ========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

      Solution: Reorder declarations as noted in the attached patch.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            brianevans Brian Evans added a comment -

            maria variable order.patch
            LPexportBug385648_maria%20variable%20order.patch

            Show
            brianevans Brian Evans added a comment - maria variable order.patch LPexportBug385648_maria%20variable%20order.patch
            Hide
            brianevans Brian Evans added a comment -

            Re: Visual C++ Compile error on storage/maria/ma_rt_index.c

            Show
            brianevans Brian Evans added a comment - Re: Visual C++ Compile error on storage/maria/ma_rt_index.c
            Hide
            brianevans Brian Evans added a comment -

            Re: Visual C++ Compile error on storage/maria/ma_rt_index.c
            Fixed with r2728

            Show
            brianevans Brian Evans added a comment - Re: Visual C++ Compile error on storage/maria/ma_rt_index.c Fixed with r2728
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 385648

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 385648

              People

              • Assignee:
                Unassigned
                Reporter:
                brianevans Brian Evans
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: