Ticket #10777: 0001-Fix-gcc-4.9.0-build.patch

File 0001-Fix-gcc-4.9.0-build.patch, 2.5 KB (added by mt, 10 years ago)
  • src/apps/terminal/Shell.cpp

    From 45cc3881cf271eca8d3f6a4b4f776c037c295975 Mon Sep 17 00:00:00 2001
    From: Murai Takashi <tmurai01@gmail.com>
    Date: Thu, 24 Apr 2014 05:26:03 +0900
    Subject: [PATCH] Fix gcc 4.9.0 build
    
    ---
     src/apps/terminal/Shell.cpp                      |    2 +-
     src/kits/package/hpkg/v1/PackageDataReaderV1.cpp |    4 ++--
     src/system/kernel/fs/vfs_net_boot.cpp            |    2 +-
     src/system/kernel/system_info.cpp                |    2 +-
     4 files changed, 5 insertions(+), 5 deletions(-)
    
    diff --git a/src/apps/terminal/Shell.cpp b/src/apps/terminal/Shell.cpp
    index 9fdd2de..dce942e 100644
    a b Shell::GetActiveProcessInfo(ActiveProcessInfo& _info) const  
    276276    // fetch the name and the current directory from the info
    277277    const char* name;
    278278    int32 cwdDevice;
    279     int64 cwdDirectory;
     279    int64 cwdDirectory = 0;
    280280    if (info.FindString("name", &name) != B_OK
    281281        || info.FindInt32("cwd device", &cwdDevice) != B_OK
    282282        || info.FindInt64("cwd directory", &cwdDirectory) != B_OK) {
  • src/kits/package/hpkg/v1/PackageDataReaderV1.cpp

    diff --git a/src/kits/package/hpkg/v1/PackageDataReaderV1.cpp b/src/kits/package/hpkg/v1/PackageDataReaderV1.cpp
    index c45e0ab..6893103 100644
    a b private:  
    266266            return B_OK;
    267267
    268268        // get the chunk offset and size
    269         uint64 offset;
    270         uint32 compressedSize;
     269        uint64 offset = 0;
     270        uint32 compressedSize = 0;
    271271        status_t error = _GetCompressedChunkOffsetAndSize(chunkIndex, offset,
    272272            compressedSize);
    273273        if (error != B_OK)
  • src/system/kernel/fs/vfs_net_boot.cpp

    diff --git a/src/system/kernel/fs/vfs_net_boot.cpp b/src/system/kernel/fs/vfs_net_boot.cpp
    index 981c226..8880c89 100644
    a b NetBootMethod::Init()  
    319319    status_t status;
    320320
    321321    uint64 clientMAC;
    322     uint32 clientIP;
     322    uint32 clientIP = 0;
    323323    uint32 netMask;
    324324    if (fBootVolume.FindInt64("client MAC", (int64*)&clientMAC) != B_OK
    325325        || fBootVolume.FindInt32("client IP", (int32*)&clientIP) != B_OK) {
  • src/system/kernel/system_info.cpp

    diff --git a/src/system/kernel/system_info.cpp b/src/system/kernel/system_info.cpp
    index 4308c44..f09a7a0 100644
    a b private:  
    240240        MutexLocker locker(fLock);
    241241
    242242        int32 eventCode;
    243         int32 teamID;
     243        int32 teamID = 0;
    244244        if (event->FindInt32("event", &eventCode) != B_OK
    245245            || event->FindInt32("team", &teamID) != B_OK) {
    246246            return;