source: packages/net/pepperspot/patches/102-no_warnings.patch @ 21017

Last change on this file since 21017 was 21017, checked in by nico, 6 years ago

[packages] pepperspot: update to 0.3 (closes: #7191)

File size: 4.5 KB
  • src/pepper.c

    a b static int set_env(char *name, char *val 
    389389  } 
    390390  else if(mac != NULL) 
    391391  { 
    392     (void) snprintf(s, sizeof(s) - 1, "%.2X-%.2X-%.2X-%.2X-%.2X-%.2X", 
     392    (void) snprintf(s, sizeof(s) - 1, "%.2hX-%.2hX-%.2hX-%.2hX-%.2hX-%.2hX", 
    393393                    mac[0], mac[1], 
    394394                    mac[2], mac[3], 
    395395                    mac[4], mac[5]); 
    static int set_envv6(char *name, char *v 
    447447  } 
    448448  else if(mac != NULL) 
    449449  { 
    450     (void) snprintf(s, sizeof(s) - 1, "%.2X-%.2X-%.2X-%.2X-%.2X-%.2X", 
     450    (void) snprintf(s, sizeof(s) - 1, "%.2hX-%.2hX-%.2hX-%.2hX-%.2hX-%.2hX", 
    451451                    mac[0], mac[1], 
    452452                    mac[2], mac[3], 
    453453                    mac[4], mac[5]); 
    static int set_macallowed(char *macallow 
    958958    for(i = 0; i < strlen(p1); i++) 
    959959      if(!isxdigit(p1[i])) p1[i] = 0x20; 
    960960 
    961     if(sscanf(p1, "%2x %2x %2x %2x %2x %2x", 
     961    if(sscanf(p1, "%2hhx %2hhx %2hhx %2hhx %2hhx %2hhx", 
    962962                &options.macok[options.macoklen][0], 
    963963                &options.macok[options.macoklen][1], 
    964964                &options.macok[options.macoklen][2], 
    static int set_macallowed(char *macallow 
    973973    } 
    974974    if(options.debug & DEBUG_CONF) 
    975975    { 
    976       printf("Macallowed address #%d: %.2X-%.2X-%.2X-%.2X-%.2X-%.2X\n", 
     976      printf("Macallowed address #%d: %.2hhX-%.2hhX-%.2hhX-%.2hhX-%.2hhX-%.2hhX\n", 
    977977             options.macoklen, 
    978978             options.macok[options.macoklen][0], 
    979979             options.macok[options.macoklen][1], 
  • src/redir.c

    a b static int redir_hextochar(char *src, in 
    178178{ 
    179179  char x[3]; 
    180180  int n = 0; 
    181   int y = 0; 
     181  unsigned int y = 0; 
    182182  int nb = len / 2; 
    183183 
    184184  for(n = 0 ; n < nb ; n++) 
  • src/radius.c

    a b int radius_getattr(struct radius_packet_ 
    971971      } 
    972972      offset +=  t->l; 
    973973    } 
    974     while(offset < (ntohs(pack->length) - RADIUS_HDRSIZE)); /* TODO */ 
     974    while(offset < ((int)ntohs(pack->length) - RADIUS_HDRSIZE)); /* TODO */ 
    975975  } 
    976976  else       /* Need to check pack -> length */ 
    977977  { 
    int radius_getattr(struct radius_packet_ 
    992992      } 
    993993      offset +=  t->l; 
    994994    } 
    995     while(offset < (ntohs(pack->length) - RADIUS_HDRSIZE)); /* TODO */ 
     995    while(offset < ((int)ntohs(pack->length) - RADIUS_HDRSIZE)); /* TODO */ 
    996996  } 
    997997 
    998998  return -1; /* Not found */ 
    int radius_getattrv6(struct radius_packe 
    10401040      } 
    10411041      offset +=  t->l; 
    10421042    } 
    1043     while(offset < (ntohs(pack->length) - RADIUS_HDRSIZE)); /* TODO */ 
     1043    while(offset < ((int)ntohs(pack->length) - RADIUS_HDRSIZE)); /* TODO */ 
    10441044  } 
    10451045  else       /* Need to check pack -> length */ 
    10461046  { 
    int radius_getattrv6(struct radius_packe 
    10611061      } 
    10621062      offset +=  t->l; 
    10631063    } 
    1064     while(offset < (ntohs(pack->length) - RADIUS_HDRSIZE)); /* TODO */ 
     1064    while(offset < ((int)ntohs(pack->length) - RADIUS_HDRSIZE)); /* TODO */ 
    10651065  } 
    10661066 
    10671067  return -1; /* Not found */ 
    int radius_getattrv6(struct radius_packe 
    10901090    } 
    10911091    offset +=  2 + t->l; 
    10921092  } 
    1093   while(offset < ntohs(pack->length)); 
     1093  while(offset < (int)ntohs(pack->length)); 
    10941094 
    10951095  if(0) printf("Count %d\n", count); 
    10961096  return count; 
    int radius_decaps(struct radius_t *this) 
    19031903    return -1; 
    19041904  } 
    19051905 
    1906   if(ntohs(pack.length) != status) 
     1906  if((int)ntohs(pack.length) != status) 
    19071907  { 
    19081908    sys_err(LOG_WARNING, __FILE__, __LINE__, errno, 
    19091909            "Received radius packet with wrong length field %d != %d!", 
    int radius_proxy_ind(struct radius_t *th 
    21072107    return -1; 
    21082108  } 
    21092109 
    2110   if(ntohs(pack.length) != status) 
     2110  if((int)ntohs(pack.length) != status) 
    21112111  { 
    21122112    sys_err(LOG_WARNING, __FILE__, __LINE__, 0, 
    21132113            "Received radius packet with wrong length field %d != %d!", 
  • src/dhcp.c

    a b static int dhcp_tcp_checkv6(struct dhcp_ 
    240240  struct dhcp_tcphdr_t *tcph = NULL; 
    241241  int tcp_len = 0; 
    242242 
    243   if(ntohs(pack->ip6h.payload_length) > (length - DHCP_ETH_HLEN)) 
     243  if((int)ntohs(pack->ip6h.payload_length) > (length - DHCP_ETH_HLEN)) 
    244244    return -1; /* Wrong length of packet */ 
    245245 
    246246  tcp_len = ntohs(pack->ip6h.payload_length); 
    static int dhcp_tcp_check(struct dhcp_ip 
    347347  struct dhcp_tcphdr_t *tcph; 
    348348  int tcp_len = 0; 
    349349 
    350   if(ntohs(pack->iph.tot_len) > (length - DHCP_ETH_HLEN)) 
     350  if((int)ntohs(pack->iph.tot_len) > (length - DHCP_ETH_HLEN)) 
    351351    return -1; /* Wrong length of packet */ 
    352352 
    353353  tcp_len = ntohs(pack->iph.tot_len) - pack->iph.ihl * 4; 
Note: See TracBrowser for help on using the repository browser.