Ticket #6840: haiku.gcc4.5.diff

File haiku.gcc4.5.diff, 4.9 KB (added by korli, 13 years ago)

patch to fix gcc 4.5 warnings considered as errors (mostly enum related)

  • ../src/add-ons/kernel/bus_managers/scsi/device_scan.cpp

     
    117117            // bad luck
    118118            if (std::min((int)cmd->allocation_length,
    119119                        new_inquiry_data->additional_length + 4)
    120                     >= (int)offsetof(scsi_res_inquiry, version_descriptor[9])) {
     120                    >= (int)offsetof(scsi_res_inquiry, _res74)) {
    121121                int i, previousStandard = -1;
    122122
    123123                for (i = 0; i < 8; ++i) {
  • ../src/add-ons/decorators/BeDecorator/BeDecorator.cpp

     
    267267
    268268    bool hasTab = false;
    269269
    270     switch (Look()) {
     270    switch ((int)Look()) {
    271271        case B_MODAL_WINDOW_LOOK:
    272272            fBorderWidth = 5;
    273273            break;
     
    429429
    430430    // Draw the border frame
    431431    BRect r = BRect(fTopBorder.LeftTop(), fBottomBorder.RightBottom());
    432     switch (fLook) {
     432    switch ((int)fLook) {
    433433        case B_TITLED_WINDOW_LOOK:
    434434        case B_DOCUMENT_WINDOW_LOOK:
    435435        case B_MODAL_WINDOW_LOOK:
     
    540540    if (!(fFlags & B_NOT_RESIZABLE)) {
    541541        r = fResizeRect;
    542542
    543         switch (fLook) {
     543        switch ((int)fLook) {
    544544            case B_DOCUMENT_WINDOW_LOOK:
    545545            {
    546546                if (!invalid.Intersects(r))
     
    884884    // Handle invalidation of resize rect
    885885    if (dirty && !(fFlags & B_NOT_RESIZABLE)) {
    886886        BRect realResizeRect;
    887         switch (fLook) {
     887        switch ((int)fLook) {
    888888            case B_DOCUMENT_WINDOW_LOOK:
    889889                realResizeRect = fResizeRect;
    890890                // Resize rect at old location
  • ../src/add-ons/decorators/SATDecorator/SATDecorator.cpp

     
    126126
    127127    bool hasTab = false;
    128128
    129     switch (Look()) {
     129    switch ((int)Look()) {
    130130        case B_MODAL_WINDOW_LOOK:
    131131            fBorderWidth = 5;
    132132            break;
  • ../src/servers/app/DefaultDecorator.cpp

     
    350350
    351351    bool hasTab = false;
    352352
    353     switch (Look()) {
     353    switch ((int)Look()) {
    354354        case B_MODAL_WINDOW_LOOK:
    355355            fBorderWidth = 5;
    356356            break;
     
    511511
    512512    // Draw the border frame
    513513    BRect r = BRect(fTopBorder.LeftTop(), fBottomBorder.RightBottom());
    514     switch (fLook) {
     514    switch ((int)fLook) {
    515515        case B_TITLED_WINDOW_LOOK:
    516516        case B_DOCUMENT_WINDOW_LOOK:
    517517        case B_MODAL_WINDOW_LOOK:
     
    655655        ComponentColors colors;
    656656        _GetComponentColors(COMPONENT_RESIZE_CORNER, colors);
    657657
    658         switch (fLook) {
     658        switch ((int)fLook) {
    659659            case B_DOCUMENT_WINDOW_LOOK:
    660660            {
    661661                if (!invalid.Intersects(r))
     
    989989    // Handle invalidation of resize rect
    990990    if (dirty && !(fFlags & B_NOT_RESIZABLE)) {
    991991        BRect realResizeRect;
    992         switch (fLook) {
     992        switch ((int)fLook) {
    993993            case B_DOCUMENT_WINDOW_LOOK:
    994994                realResizeRect = fResizeRect;
    995995                // Resize rect at old location
  • ../src/kits/tracker/FSUtils.h

     
    259259_IMPEXP_TRACKER status_t FSLaunchUsing(const entry_ref *ref, BMessage *listOfRefs);
    260260
    261261
    262 // some extra directory_which values
    263 // move these to FindDirectory.h
    264 const uint32 B_USER_MAIL_DIRECTORY = 3500;
    265 const uint32 B_USER_QUERIES_DIRECTORY = 3501;
    266 const uint32 B_USER_PEOPLE_DIRECTORY = 3502;
    267 const uint32 B_USER_DOWNLOADS_DIRECTORY = 3503;
    268 const uint32 B_USER_DESKBAR_APPS_DIRECTORY = 3504;
    269 const uint32 B_USER_DESKBAR_PREFERENCES_DIRECTORY = 3505;
    270 const uint32 B_USER_DESKBAR_DEVELOP_DIRECTORY = 3506;
    271 const uint32 B_BOOT_DISK = 3507;
    272     // map /boot into the directory_which enum for convenience
    273 
    274262class WellKnowEntryList {
    275263    // matches up names, id's and node_refs of well known entries in the
    276264    // system hierarchy
  • ../headers/os/storage/FindDirectory.h

     
    6969    B_USER_SOUNDS_DIRECTORY,
    7070    B_USER_DATA_DIRECTORY,
    7171    B_USER_CACHE_DIRECTORY,
     72    B_USER_MAIL_DIRECTORY,
     73    B_USER_QUERIES_DIRECTORY,
     74    B_USER_PEOPLE_DIRECTORY,
     75    B_USER_DOWNLOADS_DIRECTORY,
     76    B_USER_DESKBAR_APPS_DIRECTORY,
     77    B_USER_DESKBAR_PREFERENCES_DIRECTORY,
     78    B_USER_DESKBAR_DEVELOP_DIRECTORY,
     79   
    7280
    7381    /* Global directories. */
    7482    B_APPS_DIRECTORY                    = 4000,
    7583    B_PREFERENCES_DIRECTORY,
    7684    B_UTILITIES_DIRECTORY,
     85    B_BOOT_DISK,
    7786
    7887    /* Obsolete: Legacy BeOS definition to be phased out */
    7988    B_BEOS_DIRECTORY                    = 1000,