Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 3db8889 in mainline


Ignore:
Timestamp:
2010-03-24T06:49:42Z (12 years ago)
Author:
Lukas Mejdrech <lukasmejdrech@…>
Branches:
lfn, master
Children:
40e29f5
Parents:
5814ef7
Message:
  • make IPC_SET macros even more explicit
Location:
uspace/srv/net
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/il/ip/ip_messages.h

    r5814ef7 r3db8889  
    8585 */
    8686#define IP_SET_HEADERLEN(answer, value) \
    87         {ipcarg_t argument = (value); IPC_SET_ARG2(*answer, argument);}
     87        {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG2(*answer, argument);}
    8888
    8989/** Returns the network mask message parameter.
  • uspace/srv/net/messages.h

    r5814ef7 r3db8889  
    415415 */
    416416#define IPC_SET_DEVICE(answer, value) \
    417         {ipcarg_t argument = (value); IPC_SET_ARG1(*answer, argument);}
     417        {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG1(*answer, argument);}
    418418
    419419/** Sets the minimum address length in the message answer.
     
    421421 */
    422422#define IPC_SET_ADDR(answer, value) \
    423         {ipcarg_t argument = (value); IPC_SET_ARG1(*answer, argument);}
     423        {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG1(*answer, argument);}
    424424
    425425/*@}*/
     
    433433 */
    434434#define IPC_SET_PREFIX(answer, value) \
    435         {ipcarg_t argument = (value); IPC_SET_ARG2(*answer, argument);}
     435        {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG2(*answer, argument);}
    436436
    437437/*@}*/
     
    445445 */
    446446#define IPC_SET_CONTENT(answer, value) \
    447         {ipcarg_t argument = (value); IPC_SET_ARG3(*answer, argument);}
     447        {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG3(*answer, argument);}
    448448
    449449/*@}*/
     
    457457 */
    458458#define IPC_SET_SUFFIX(answer, value) \
    459         {ipcarg_t argument = (value); IPC_SET_ARG4(*answer, argument);}
     459        {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG4(*answer, argument);}
    460460
    461461/*@}*/
  • uspace/srv/net/socket/socket_messages.h

    r5814ef7 r3db8889  
    116116 */
    117117#define SOCKET_SET_SOCKET_ID(answer, value) \
    118         {ipcarg_t argument = (value); IPC_SET_ARG1(answer, argument);}
     118        {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG1(answer, argument);}
    119119
    120120/** Returns the socket identifier message parameter.
     
    128128 */
    129129#define SOCKET_SET_READ_DATA_LENGTH(answer, value) \
    130         {ipcarg_t argument = (value); IPC_SET_ARG1(answer, argument);}
     130        {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG1(answer, argument);}
    131131
    132132/** Returns the read data length message parameter.
     
    158158 */
    159159#define SOCKET_SET_DATA_FRAGMENT_SIZE(answer, value) \
    160         {ipcarg_t argument = (value); IPC_SET_ARG2(answer, argument);}
     160        {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG2(answer, argument);}
    161161
    162162/** Sets the address length in the message answer.
     
    164164 */
    165165#define SOCKET_SET_ADDRESS_LENGTH(answer, value) \
    166         {ipcarg_t argument = (value); IPC_SET_ARG3(answer, argument);}
     166        {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG3(answer, argument);}
    167167
    168168/** Returns the address length message parameter.
     
    177177#define SOCKET_SET_HEADER_SIZE(answer, value) \
    178178        \
    179         {ipcarg_t argument = (value); IPC_SET_ARG3(answer, argument);}
     179        {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG3(answer, argument);}
    180180
    181181/** Returns the header size message parameter.
  • uspace/srv/net/structures/packet/packet_server.c

    r5814ef7 r3db8889  
    194194                        }
    195195                        *answer_count = 2;
    196                         IPC_SET_ARG1(*answer, packet->packet_id);
    197                         IPC_SET_ARG2(*answer, packet->length);
     196                        IPC_SET_ARG1(*answer, (ipcarg_t) packet->packet_id);
     197                        IPC_SET_ARG2(*answer, (ipcarg_t) packet->length);
    198198                        return EOK;
    199199                case NET_PACKET_CREATE_4:
     
    203203                        }
    204204                        *answer_count = 2;
    205                         IPC_SET_ARG1(*answer, packet->packet_id);
    206                         IPC_SET_ARG2(*answer, packet->length);
     205                        IPC_SET_ARG1(*answer, (ipcarg_t) packet->packet_id);
     206                        IPC_SET_ARG2(*answer, (ipcarg_t) packet->length);
    207207                        return EOK;
    208208                case NET_PACKET_GET:
     
    217217                                return ENOENT;
    218218                        }
    219                         IPC_SET_ARG1(*answer, packet->length);
     219                        IPC_SET_ARG1(*answer, (ipcarg_t) packet->length);
    220220                        *answer_count = 1;
    221221                        return EOK;
Note: See TracChangeset for help on using the changeset viewer.