mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-25 09:41:11 -06:00
Yet another clang compiler warning suppressed.
This commit is contained in:
parent
2393d64a5a
commit
f61119e02f
3 changed files with 8 additions and 10 deletions
|
|
@ -52,9 +52,8 @@ static void unmount_callback(DADiskRef disk, DADissenterRef dissenter, void *con
|
|||
{
|
||||
int err = 0;
|
||||
DADiskRef disk;
|
||||
DASessionRef session;
|
||||
CFDictionaryRef descDict;
|
||||
session = DASessionCreate(nullptr);
|
||||
CFDictionaryRef descDict = nullptr;
|
||||
DASessionRef session = DASessionCreate(nullptr);
|
||||
if (session == nullptr)
|
||||
err = EINVAL;
|
||||
if (err == 0) {
|
||||
|
|
@ -96,16 +95,15 @@ static void unmount_callback(DADiskRef disk, DADissenterRef dissenter, void *con
|
|||
//this eject drive is not used now
|
||||
-(void)eject_drive:(NSString *)path
|
||||
{
|
||||
DADiskRef disk;
|
||||
DASessionRef session;
|
||||
NSURL *url = [[NSURL alloc] initFileURLWithPath:path];
|
||||
DASessionRef session = DASessionCreate(nullptr);
|
||||
int err = 0;
|
||||
session = DASessionCreate(nullptr);
|
||||
if (session == nullptr)
|
||||
err = EINVAL;
|
||||
DADiskRef disk = nullptr;
|
||||
if (err == 0)
|
||||
disk = DADiskCreateFromVolumePath(nullptr, session, (CFURLRef)url);
|
||||
if (err == 0)
|
||||
disk = DADiskCreateFromVolumePath(nullptr,session,(CFURLRef)url);
|
||||
if( err == 0)
|
||||
//DADiskUnmount(disk, kDADiskUnmountOptionDefault, nullptr, nullptr);
|
||||
DADiskUnmount(disk, kDADiskUnmountOptionWhole | kDADiskUnmountOptionForce, unmount_callback, nullptr);
|
||||
if (disk != nullptr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue