Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
One more compiler warning cleanup.
  • Loading branch information
icculus committed Jan 27, 2006
1 parent 758f5ca commit 4cb84a1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions platform_unix.c
Expand Up @@ -359,14 +359,18 @@ int locate_product_by_identifier(const char *str, char *buf, size_t bufsize)
/* Ask LaunchServices to find product by identifier... */
OSStatus rc;
CFURLRef url = NULL;
CFStringRef id = CFStringCreateWithBytes(NULL, str, strlen(str),
CFStringRef id = CFStringCreateWithBytes(NULL,
(const unsigned char *) str,
strlen(str),
kCFStringEncodingISOLatin1, 0);

rc = LSFindApplicationForInfo(kLSUnknownCreator, id, NULL, NULL, &url);
CFRelease(id);
if (rc == noErr)
{
int b = (int) CFURLGetFileSystemRepresentation(url, TRUE, buf, bufsize);
int b = (int) CFURLGetFileSystemRepresentation(url, TRUE,
(unsigned char *) buf,
bufsize);
if (b) b = 1;
CFRelease(url);
if ((b) && (strstr(buf, "/.Trash/")))
Expand Down

0 comments on commit 4cb84a1

Please sign in to comment.