[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re:[ns] ns-2.1b7 compilation problem:diffusion



Hi Glenson
you have to add some lines in diffusion/diff_rate.cc. In every function
ParseSubType, ParseOrgType, ParsePosType, ParsePosNodeType,
ParseNegWinType, ParseNegThrType, ParseNegMaxType you can find an
exit(-1) command. All this function request a return value and, if no
'if statements' before exit(-1) are executed, the function return
without a value: so the compiler give you an error. To solve this
problem add a return <something> after every exit(-1) command, where
<anything> is equal to a value that the function should return if it
execute one of the previus 'if statement'.
For example, in function ParseSubType you have to add the following
line:

    exit(-1);
    return UNICAST_SUB;        <== add this one

and for ParseOrgType function you have to add the following lines

    exit(-1);
    return UNICAST ;                <== add this one

and so on.
Bye

Federico Orlandini
Network Research Group
University of Pisa