Opened 16 years ago

Closed 16 years ago

#4740 closed defect (fixed)

Why pass return value pointer to pthread_join if we don't look at it?

Reported by: Erik Hovland <erik@…> Owned by: Isaac Richards
Priority: trivial Milestone: 0.21
Component: mythtv Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description

pthread_join can give the caller the return value of the function that was run by the thread the caller is trying to join to. This is done by passing a void double pointer.

main() in programs/mythtv does this. But doesn't do anything with the pointer.

Since it doesn't do anything with it, there really isn't a point in allocating the variable on the stack and passing it.

Attachments (1)

why-give-value-when-not-used-mythtv-main.patch (726 bytes) - added by Erik Hovland <erik@…> 16 years ago.
Removes unneeded variable

Download all attachments as: .zip

Change History (2)

Changed 16 years ago by Erik Hovland <erik@…>

Removes unneeded variable

comment:1 Changed 16 years ago by paulh

Resolution: fixed
Status: newclosed

(In [16225]) Don't bother getting the return value from a pthread_join since we don't use it. Closes #4740.

Note: See TracTickets for help on using tickets.