Changeset 0483e1e for protocols/msn


Ignore:
Timestamp:
2016-11-28T19:26:16Z (8 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
90254d0
Parents:
2a1c27f
Message:

Fix some compiler warnings

warn_unused_result on write() is particularly annoying. You can't just
add (void) to ignore it due to gcc bug 66425.

I replaced some of those with fwrite() and used a variable marked with
the G_GNUC_UNUSED attribute for the writes from signal handlers.

Location:
protocols/msn
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/msn_util.c

    r2a1c27f r0483e1e  
    180180        if (getenv("BITLBEE_DEBUG")) {
    181181                fprintf(stderr, "\n\x1b[92m<<< ");
    182                 write(2, bytes , st);
     182                fwrite(bytes, st, 1, stderr);
    183183                fprintf(stderr, "\x1b[97m");
    184184        }
  • protocols/msn/soap.c

    r2a1c27f r0483e1e  
    213213        if (headers) {
    214214                if ((s = strstr(headers, "\r\n\r\n"))) {
    215                         write(2, headers, s - headers + 4);
     215                        fwrite(headers, s - headers + 4, 1, stderr);
    216216                } else {
    217                         write(2, headers, strlen(headers));
     217                        fwrite(headers, strlen(headers), 1, stderr);
    218218                }
    219219        }
Note: See TracChangeset for help on using the changeset viewer.