[Bug 15151] New: Compile warning fixes.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Mar 20 18:16:26 PDT 2008


           Summary: Compile warning fixes.
           Product: xorg
           Version: git
          Platform: Other
        OS/Version: All
            Status: NEW
          Keywords: janitor, patch
          Severity: normal
          Priority: medium
         Component: Driver/Radeon
        AssignedTo: xorg-driver-ati at lists.x.org
        ReportedBy: pcpa at mandriva.com.br
         QAContact: xorg-team at lists.x.org

Created an attachment (id=15350)
 --> (http://bugs.freedesktop.org/attachment.cgi?id=15350)

o Make sure all functions have a prototype defined in a header file,
  before definition, and all callers include this header.
  Only Atombios/hwserv_drv.c:AllocateMemory() did have a prototype not
  matching definition, and was fixed changing first argument from VOID *
o Added an if !defined(__GNUC__) around the usage of pragma warning.
o Changed type RADEONInfoRec's FB field from void * to unsigned char *,
  and VBIOS field from CARD8 * to unsigned char *. This fixes warnings
  about usage of void * in arithmetic. Also, compiled the driver in both
  cases, with pciaccess support enabled and disabled, as gcc will also
  not allow math involving void * and unsigned char *, and fixed the few
  cases where it did happen.
o Added missing prototypes for atombios related functions
  (src/atombios_output.c and src/atombios_crtc.c) to radeon.h, so that
  no prototypes are declared in C files now, only in headers.
o Changed some atombios functions to static as they are used only inside
  the defining file, or their pointers are set to structure fields.
o _X_EXPORT'ed src/theatre200.c/DumpRageTheatreRegsByName() as it was
  missed in previous patch and would cause problems if compiled with
  hidden symbols. Actually, this code should be reviewed, as some of
  these symbols are also called from the X Server. Probably they should
  their pointers should be members of some data structure. This would be
  mandatory if theatre200_drv.so and theatre_drv.so would be both loaded.

  This is also a reasonable large patch, but it fixes all compiler warnings.
Please review.

The compiler options used were:
-Wbad-function-cast -Wdeclaration-after-statement -Wmissing-prototypes
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing
-Wold-style-definition -Wpointer-arith -Wstrict-prototypes

Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the xorg-driver-ati mailing list