From: Adeel Kazmi Date: Wed, 23 May 2018 11:21:59 +0000 (+0100) Subject: Fixed SVACE errors X-Git-Tag: dali_1.3.26~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F50%2F179950%2F2;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Fixed SVACE errors Change-Id: Idfd3444bad32d616259f7716cb77c178de31c4e8 --- diff --git a/dali/devel-api/adaptor-framework/gif-loading.cpp b/dali/devel-api/adaptor-framework/gif-loading.cpp index ba9db54..c1c6725 100755 --- a/dali/devel-api/adaptor-framework/gif-loading.cpp +++ b/dali/devel-api/adaptor-framework/gif-loading.cpp @@ -688,10 +688,20 @@ bool ReadHeader( LoaderInfo &loaderInfo, FILE * const fp = fileReader.GetFile(); if ( NULL != fp ) { - fseek( fp, 0, SEEK_SET ); - fileData.globalMap = reinterpret_cast( malloc(sizeof( GifByteType ) * blobSize ) ); - fileData.length = fread( fileData.globalMap, sizeof( GifByteType ), blobSize, fp); - fileInfo.map = fileData.globalMap; + if( ( ! fseek( fp, 0, SEEK_SET ) ) ) + { + fileData.globalMap = reinterpret_cast( malloc(sizeof( GifByteType ) * blobSize ) ); + fileData.length = fread( fileData.globalMap, sizeof( GifByteType ), blobSize, fp); + fileInfo.map = fileData.globalMap; + } + else + { + DALI_LOG_ERROR( "Error seeking within file\n" ); + } + } + else + { + DALI_LOG_ERROR( "Error reading file\n" ); } } } @@ -1185,6 +1195,13 @@ public: ReadHeader( loaderInfo, imageProperties, &error ); } + // Moveable but not copyable + + Impl( const Impl& ) = delete; + Impl& operator=( const Impl& ) = delete; + Impl( Impl&& ) = default; + Impl& operator=( Impl&& ) = default; + ~Impl() { if( loaderInfo.fileData.globalMap ) diff --git a/dali/internal/imaging/common/file-download.h b/dali/internal/imaging/common/file-download.h index 20380a0..c7fb345 100644 --- a/dali/internal/imaging/common/file-download.h +++ b/dali/internal/imaging/common/file-download.h @@ -2,7 +2,7 @@ #define __DALI_TIZEN_PLATFORM_NETWORK_FILE_DOWNLOAD_H__ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,6 +52,13 @@ public: */ ~CurlEnvironment(); + // Moveable but not copyable + + CurlEnvironment( const CurlEnvironment& ) = delete; + CurlEnvironment& operator=( const CurlEnvironment& ) = delete; + CurlEnvironment( CurlEnvironment&& ) = default; + CurlEnvironment& operator=( CurlEnvironment&& ) = default; + /** * Locking function for libcurl with openssl */