Ignore:
Timestamp:
Jan 1, 2009 10:08:21 PM (15 years ago)
Author:
bennylp
Message:

Fixed gcc-4.3.2 warnings with the warn_unused_result flag in some APIs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/samples/confsample.c

    r2394 r2408  
    106106 
    107107    printf("%s (empty to cancel): ", title); fflush(stdout); 
    108     fgets(buf, len, stdin); 
     108    if (fgets(buf, len, stdin) == NULL) 
     109        return PJ_FALSE; 
    109110 
    110111    /* Remove trailing newlines. */ 
     
    269270        char tmp2[10]; 
    270271        char *err; 
    271         int src, dst, level; 
     272        int src, dst, level, dur; 
    272273 
    273274        puts(""); 
     
    286287        printf("Enter selection: "); fflush(stdout); 
    287288 
    288         fgets(tmp, sizeof(tmp), stdin); 
     289        if (fgets(tmp, sizeof(tmp), stdin) == NULL) 
     290            break; 
    289291 
    290292        switch (tmp[0]) { 
     
    416418            if (!input("Duration to monitor (in seconds)", tmp1, sizeof(tmp1)) ) 
    417419                continue; 
    418             strtol(tmp1, &err, 10); 
     420            dur = strtol(tmp1, &err, 10); 
    419421            if (*err) { 
    420422                puts("Invalid duration number"); 
     
    422424            } 
    423425 
    424             monitor_level(conf, src, tmp2[0], strtol(tmp1, &err, 10)); 
     426            monitor_level(conf, src, tmp2[0], dur); 
    425427            break; 
    426428 
Note: See TracChangeset for help on using the changeset viewer.