patch-proc_c 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. --- ltrace-0.7.3.orig/proc.c 2013-02-05 12:05:39.000000000 +0100
  2. +++ ltrace-0.7.3/proc.c 2013-10-16 11:37:49.000000000 +0200
  3. @@ -329,6 +329,7 @@ clone_single_bp(void *key, void *value,
  4. int
  5. process_clone(struct Process *retp, struct Process *proc, pid_t pid)
  6. {
  7. + __attribute__((unused))int rc;
  8. if (process_bare_init(retp, proc->filename, pid, 0) < 0) {
  9. fail1:
  10. fprintf(stderr, "failed to clone process %d->%d : %s\n",
  11. @@ -432,7 +433,7 @@ process_clone(struct Process *retp, stru
  12. * library. */
  13. if (!elem->is_syscall && elem->c_un.libfunc != NULL) {
  14. struct library_symbol *libfunc = elem->c_un.libfunc;
  15. - int rc = proc_find_symbol(retp, libfunc,
  16. + rc = proc_find_symbol(retp, libfunc,
  17. NULL, &elem->c_un.libfunc);
  18. assert(rc == 0);
  19. }
  20. @@ -937,10 +938,11 @@ proc_add_breakpoint(struct Process *proc
  21. void
  22. proc_remove_breakpoint(struct Process *proc, struct breakpoint *bp)
  23. {
  24. + __attribute__((unused))struct breakpoint *removed;
  25. debug(DEBUG_FUNCTION, "proc_remove_breakpoint(pid=%d, %s@%p)",
  26. proc->pid, breakpoint_name(bp), bp->addr);
  27. check_leader(proc);
  28. - struct breakpoint *removed = dict_remove(proc->breakpoints, bp->addr);
  29. + removed = dict_remove(proc->breakpoints, bp->addr);
  30. assert(removed == bp);
  31. }