Commit 6d741615 authored by Andrea Zoli's avatar Andrea Zoli
Browse files

Remove some warning.

parent d66fbbc4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -33,6 +33,9 @@ public:

    virtual ~SourceDataField();
	
	/// Sets the stream of byte. This method assigns the value of stream for each field of part of packet
    virtual bool setByteStream(ByteStreamPtr s, bool onlySections = false) { PartOfPacket::setByteStream(s); return true; };

    /// Gets the total max dimension in bytes of source data field
    virtual dword getMaxDimension() = 0;

+2 −2
Original line number Diff line number Diff line
@@ -402,7 +402,7 @@ bool Packet::verifyPacketValue(ByteStreamPtr prefix, ByteStreamPtr packetHeader,
    for(unsigned i = 0; i< number_of_identifier; i++)
    {
        PacketIdentifier* pi = identifiers[i];
        Field* f;
        Field* f = NULL;
        switch(pi->type)
        {
        case 0:
@@ -416,7 +416,7 @@ bool Packet::verifyPacketValue(ByteStreamPtr prefix, ByteStreamPtr packetHeader,
            f = dataField->sourceDataField->getFields(pi->fieldNumber);
            break;
        }
        if(f->value != pi->value)
        if(f == NULL || f->value != pi->value)
        {
            verified = false;
            break;
+2 −2
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ PartOfPacket::~PartOfPacket()
string* PartOfPacket::printStructure()
{
    bool first = true;
    char *s;
    char *s = NULL;

    for(unsigned i=0; i< numberOfFields; i++)
    {
@@ -268,7 +268,7 @@ bool PartOfPacket::setByteStream(ByteStreamPtr s)
            /*		cout << i << ": " << ftemp->value << endl;
            		cout << i << ": " << (ftemp->value << currentDimBit) << endl;
            		cout << i << ": " << wordtemp << endl;*/
            ftemp->value = (ftemp->value) | wordtemp & pattern[dimbit];
            ftemp->value = ftemp->value | (wordtemp & pattern[dimbit]);
            /*		cout << i << ": " << ftemp->value << endl;
            		cout << i << ": " << (wordtemp & pattern[dimbit]) << endl;*/
        }
+2 −2
Original line number Diff line number Diff line
@@ -264,12 +264,12 @@ dword SDFBlockFixed::getDimension(word nblock)
dword SDFBlockFixed::getMaxDimension()
{
	/// Event dimension
    dword dimOfEventBlock;        
    dword dimOfEventBlock = 0;
    if(block != NULL)
        dimOfEventBlock = block[0].getDimension();
    else
    {
        ;                        //TODO lanciare una eccezione
        throw PacketException("Error on SDFBlockFixed::getMaxDimension: block is NULL");
    }
    return dimOfEventBlock * maxNumberOfBlock[0];
}
+2 −2
Original line number Diff line number Diff line
@@ -29,12 +29,12 @@ bool SDFBlockVariable::loadFields(InputText& fp) throw(PacketException*)
{
    try
    {
        char* line, *linesection;
        char* line, *linesection = NULL;
        word indexOfNElement;
        unsigned addToNElements;
        word maxNumberOfElement;
        bool first1 = true, first2 = true;
        MemoryBuffer* buffer1, *buffer2;
        MemoryBuffer* buffer1, *buffer2 = NULL;

        line = fp.getLine();
        if(strcmp(line, "fixed") == 0)