Skip to content

Commit

Permalink
Fix warnings: variable 'kret' set but not use
Browse files Browse the repository at this point in the history
[27/47] Compiling C object pcscd.p/src_hotplug_macosx.c.o
../src/hotplug_macosx.c:100:16: warning: variable 'kret' set but not used [-Wunused-but-set-variable]
  100 |         kern_return_t kret;
      |                       ^
../src/hotplug_macosx.c:117:16: warning: variable 'kret' set but not used [-Wunused-but-set-variable]
  117 |         kern_return_t kret;
      |                       ^
2 warnings generated.
  • Loading branch information
LudovicRousseau committed Oct 9, 2024
1 parent c546974 commit b165b15
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/hotplug_macosx.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,12 @@ static HPDriver *Drivers = NULL;
*/
static void HPDeviceAppeared(void *refCon, io_iterator_t iterator)
{
kern_return_t kret;
io_service_t obj;

(void)refCon;

while ((obj = IOIteratorNext(iterator)))
kret = IOObjectRelease(obj);
IOObjectRelease(obj);

HPScan();
}
Expand All @@ -114,13 +113,12 @@ static void HPDeviceAppeared(void *refCon, io_iterator_t iterator)
*/
static void HPDeviceDisappeared(void *refCon, io_iterator_t iterator)
{
kern_return_t kret;
io_service_t obj;

(void)refCon;

while ((obj = IOIteratorNext(iterator)))
kret = IOObjectRelease(obj);
IOObjectRelease(obj);

HPScan();
}
Expand Down

0 comments on commit b165b15

Please sign in to comment.