Warning fixes: no ';' at the end of functions.

svn path=/trunk/; revision=17124
This commit is contained in:
Jörg Mayer 2006-01-29 23:48:43 +00:00
parent 5340742d75
commit 133a10823e
6 changed files with 82 additions and 80 deletions

View File

@ -30,10 +30,10 @@
#include <epan/addr_resolv.h>
#include <string.h>
LUA_CLASS_DEFINE(Column,COLUMN,NOP);
LUA_CLASS_DEFINE(Columns,COLUMNS,NOP);
LUA_CLASS_DEFINE(Pinfo,PINFO,if (! *p) luaL_error(L,"null pinfo"));
LUA_CLASS_DEFINE(Address,ADDRESS,NOP);
LUA_CLASS_DEFINE(Column,COLUMN,NOP)
LUA_CLASS_DEFINE(Columns,COLUMNS,NOP)
LUA_CLASS_DEFINE(Pinfo,PINFO,if (! *p) luaL_error(L,"null pinfo"))
LUA_CLASS_DEFINE(Address,ADDRESS,NOP)
static int Address_ip(lua_State* L) {
Address addr = g_malloc(sizeof(address));
@ -578,27 +578,27 @@ static int Pinfo_tostring(lua_State *L) { lua_pushstring(L,"a Pinfo"); return 1;
return 1; \
}
PINFO_GET_NUMBER(Pinfo_number,pinfo->fd->num);
PINFO_GET_NUMBER(Pinfo_len,pinfo->fd->pkt_len);
PINFO_GET_NUMBER(Pinfo_caplen,pinfo->fd->cap_len);
PINFO_GET_NUMBER(Pinfo_abs_ts,(((double)pinfo->fd->abs_ts.secs) + (((double)pinfo->fd->abs_ts.nsecs) / 1000000000.0) ));
PINFO_GET_NUMBER(Pinfo_rel_ts,(((double)pinfo->fd->rel_ts.secs) + (((double)pinfo->fd->rel_ts.nsecs) / 1000000000.0) ));
PINFO_GET_NUMBER(Pinfo_delta_ts,(((double)pinfo->fd->del_ts.secs) + (((double)pinfo->fd->del_ts.nsecs) / 1000000000.0) ));
PINFO_GET_NUMBER(Pinfo_ipproto,pinfo->ipproto);
PINFO_GET_NUMBER(Pinfo_circuit_id,pinfo->circuit_id);
PINFO_GET_NUMBER(Pinfo_ptype,pinfo->ptype);
PINFO_GET_NUMBER(Pinfo_src_port,pinfo->srcport);
PINFO_GET_NUMBER(Pinfo_dst_port,pinfo->destport);
PINFO_GET_NUMBER(Pinfo_number,pinfo->fd->num)
PINFO_GET_NUMBER(Pinfo_len,pinfo->fd->pkt_len)
PINFO_GET_NUMBER(Pinfo_caplen,pinfo->fd->cap_len)
PINFO_GET_NUMBER(Pinfo_abs_ts,(((double)pinfo->fd->abs_ts.secs) + (((double)pinfo->fd->abs_ts.nsecs) / 1000000000.0) ))
PINFO_GET_NUMBER(Pinfo_rel_ts,(((double)pinfo->fd->rel_ts.secs) + (((double)pinfo->fd->rel_ts.nsecs) / 1000000000.0) ))
PINFO_GET_NUMBER(Pinfo_delta_ts,(((double)pinfo->fd->del_ts.secs) + (((double)pinfo->fd->del_ts.nsecs) / 1000000000.0) ))
PINFO_GET_NUMBER(Pinfo_ipproto,pinfo->ipproto)
PINFO_GET_NUMBER(Pinfo_circuit_id,pinfo->circuit_id)
PINFO_GET_NUMBER(Pinfo_ptype,pinfo->ptype)
PINFO_GET_NUMBER(Pinfo_src_port,pinfo->srcport)
PINFO_GET_NUMBER(Pinfo_dst_port,pinfo->destport)
PINFO_GET_STRING(Pinfo_curr_proto,pinfo->current_proto);
PINFO_GET_STRING(Pinfo_curr_proto,pinfo->current_proto)
PINFO_GET_ADDRESS(Pinfo_net_src,net_src);
PINFO_GET_ADDRESS(Pinfo_net_dst,net_dst);
PINFO_GET_ADDRESS(Pinfo_dl_src,dl_src);
PINFO_GET_ADDRESS(Pinfo_dl_dst,dl_dst);
PINFO_GET_ADDRESS(Pinfo_src,src);
PINFO_GET_ADDRESS(Pinfo_dst,dst);
PINFO_GET_ADDRESS(Pinfo_net_src,net_src)
PINFO_GET_ADDRESS(Pinfo_net_dst,net_dst)
PINFO_GET_ADDRESS(Pinfo_dl_src,dl_src)
PINFO_GET_ADDRESS(Pinfo_dl_dst,dl_dst)
PINFO_GET_ADDRESS(Pinfo_src,src)
PINFO_GET_ADDRESS(Pinfo_dst,dst)
static int Pinfo_visited(lua_State *L) {
Pinfo pinfo = checkPinfo(L,1);
@ -821,5 +821,5 @@ int Pinfo_register(lua_State* L) {
lua_pop(L, 1);
*/
return 1;
};
}

View File

@ -33,13 +33,13 @@
typedef eth_pref_t* Pref;
typedef eth_pref_t* Prefs;
LUA_CLASS_DEFINE(ProtoField,PROTO_FIELD,if (! *p) luaL_error(L,"null ProtoField"));
LUA_CLASS_DEFINE(ProtoFieldArray,PROTO_FIELD_ARRAY,if (! *p) luaL_error(L,"null ProtoFieldArray"));
LUA_CLASS_DEFINE(Dissector,DISSECTOR,NOP);
LUA_CLASS_DEFINE(DissectorTable,DISSECTOR_TABLE,NOP);
LUA_CLASS_DEFINE(Pref,PREF,NOP);
LUA_CLASS_DEFINE(Prefs,PREFS,NOP);
LUA_CLASS_DEFINE(Proto,PROTO,NOP);
LUA_CLASS_DEFINE(ProtoField,PROTO_FIELD,if (! *p) luaL_error(L,"null ProtoField"))
LUA_CLASS_DEFINE(ProtoFieldArray,PROTO_FIELD_ARRAY,if (! *p) luaL_error(L,"null ProtoFieldArray"))
LUA_CLASS_DEFINE(Dissector,DISSECTOR,NOP)
LUA_CLASS_DEFINE(DissectorTable,DISSECTOR_TABLE,NOP)
LUA_CLASS_DEFINE(Pref,PREF,NOP)
LUA_CLASS_DEFINE(Prefs,PREFS,NOP)
LUA_CLASS_DEFINE(Proto,PROTO,NOP)
static int new_pref(lua_State* L, pref_type_t type) {
const gchar* label = luaL_optstring(L,1,NULL);
@ -131,7 +131,7 @@ static int Pref_register(lua_State* L) {
lua_pop(L, 1);
return 1;
};
}
static int Prefs_newindex(lua_State* L) {
@ -242,7 +242,7 @@ static int Prefs_register(lua_State* L) {
luaL_openlib(L, NULL, Prefs_meta, 0);
return 1;
};
}
@ -446,17 +446,17 @@ static int ProtoField_integer(lua_State* L, enum ftenum type) {
}
#define PROTOFIELD_INTEGER(lower,FT) static int ProtoField_##lower(lua_State* L) { return ProtoField_integer(L,FT); }
PROTOFIELD_INTEGER(uint8,FT_UINT8);
PROTOFIELD_INTEGER(uint16,FT_UINT16);
PROTOFIELD_INTEGER(uint24,FT_UINT24);
PROTOFIELD_INTEGER(uint32,FT_UINT32);
PROTOFIELD_INTEGER(uint64,FT_UINT64);
PROTOFIELD_INTEGER(int8,FT_INT8);
PROTOFIELD_INTEGER(int16,FT_INT8);
PROTOFIELD_INTEGER(int24,FT_INT8);
PROTOFIELD_INTEGER(int32,FT_INT8);
PROTOFIELD_INTEGER(int64,FT_INT8);
PROTOFIELD_INTEGER(framenum,FT_FRAMENUM);
PROTOFIELD_INTEGER(uint8,FT_UINT8)
PROTOFIELD_INTEGER(uint16,FT_UINT16)
PROTOFIELD_INTEGER(uint24,FT_UINT24)
PROTOFIELD_INTEGER(uint32,FT_UINT32)
PROTOFIELD_INTEGER(uint64,FT_UINT64)
PROTOFIELD_INTEGER(int8,FT_INT8)
PROTOFIELD_INTEGER(int16,FT_INT8)
PROTOFIELD_INTEGER(int24,FT_INT8)
PROTOFIELD_INTEGER(int32,FT_INT8)
PROTOFIELD_INTEGER(int64,FT_INT8)
PROTOFIELD_INTEGER(framenum,FT_FRAMENUM)
static int ProtoField_other(lua_State* L,enum ftenum type) {
ProtoField f = g_malloc(sizeof(eth_field_t));
@ -479,19 +479,19 @@ static int ProtoField_other(lua_State* L,enum ftenum type) {
}
#define PROTOFIELD_OTHER(lower,FT) static int ProtoField_##lower(lua_State* L) { return ProtoField_other(L,FT); }
PROTOFIELD_OTHER(ipv4,FT_IPv4);
PROTOFIELD_OTHER(ipv6,FT_IPv6);
PROTOFIELD_OTHER(ipx,FT_IPXNET);
PROTOFIELD_OTHER(ether,FT_ETHER);
PROTOFIELD_OTHER(bool,FT_BOOLEAN);
PROTOFIELD_OTHER(float,FT_FLOAT);
PROTOFIELD_OTHER(double,FT_DOUBLE);
PROTOFIELD_OTHER(string,FT_STRING);
PROTOFIELD_OTHER(stringz,FT_STRINGZ);
PROTOFIELD_OTHER(bytes,FT_BYTES);
PROTOFIELD_OTHER(ubytes,FT_UINT_BYTES);
PROTOFIELD_OTHER(guid,FT_GUID);
PROTOFIELD_OTHER(oid,FT_OID);
PROTOFIELD_OTHER(ipv4,FT_IPv4)
PROTOFIELD_OTHER(ipv6,FT_IPv6)
PROTOFIELD_OTHER(ipx,FT_IPXNET)
PROTOFIELD_OTHER(ether,FT_ETHER)
PROTOFIELD_OTHER(bool,FT_BOOLEAN)
PROTOFIELD_OTHER(float,FT_FLOAT)
PROTOFIELD_OTHER(double,FT_DOUBLE)
PROTOFIELD_OTHER(string,FT_STRING)
PROTOFIELD_OTHER(stringz,FT_STRINGZ)
PROTOFIELD_OTHER(bytes,FT_BYTES)
PROTOFIELD_OTHER(ubytes,FT_UINT_BYTES)
PROTOFIELD_OTHER(guid,FT_GUID)
PROTOFIELD_OTHER(oid,FT_OID)
static int ProtoField_tostring(lua_State* L) {
@ -1070,7 +1070,7 @@ int Dissector_register(lua_State* L) {
lua_pop(L, 1);
return 1;
};
}
/*
@ -1326,7 +1326,7 @@ int DissectorTable_register(lua_State* L) {
lua_pop(L, 1);
return 1;
};
}

View File

@ -28,8 +28,8 @@
#include "packet-lua.h"
LUA_CLASS_DEFINE(Tap,TAP,NOP);
LUA_CLASS_DEFINE(Field,FIELD,NOP);
LUA_CLASS_DEFINE(Tap,TAP,NOP)
LUA_CLASS_DEFINE(Field,FIELD,NOP)
static GPtrArray* wanted_fields = NULL;
static GPtrArray* lua_taps = NULL;
@ -191,7 +191,7 @@ int Field_register(lua_State* L) {
lua_pop(L, 1);
return 1;
};
}
static int Tap_new(lua_State* L) {
@ -274,5 +274,5 @@ int Tap_register(lua_State* L) {
lua_pop(L, 1);
return 1;
};
}

View File

@ -29,9 +29,9 @@
#include "packet-lua.h"
#include <epan/expert.h>
LUA_CLASS_DEFINE(ProtoTree,PROTO_TREE,NOP);
LUA_CLASS_DEFINE(ProtoItem,ITEM,NOP);
LUA_CLASS_DEFINE(SubTree,SUBTREE,NOP);
LUA_CLASS_DEFINE(ProtoTree,PROTO_TREE,NOP)
LUA_CLASS_DEFINE(ProtoItem,ITEM,NOP)
LUA_CLASS_DEFINE(SubTree,SUBTREE,NOP)
/*

View File

@ -28,8 +28,8 @@
#include "packet-lua.h"
LUA_CLASS_DEFINE(Tvb,TVB,if (! *p) luaL_error(L,"null tvb"));
LUA_CLASS_DEFINE(ByteArray,BYTE_ARRAY,if (! *p) luaL_argerror(L,index,"null bytearray"));
LUA_CLASS_DEFINE(Tvb,TVB,if (! *p) luaL_error(L,"null tvb"))
LUA_CLASS_DEFINE(ByteArray,BYTE_ARRAY,if (! *p) luaL_argerror(L,index,"null bytearray"))
static int ByteArray_new(lua_State* L) {
GByteArray* ba = g_byte_array_new();
@ -281,7 +281,7 @@ int ByteArray_register(lua_State* L) {
lua_pop(L, 1);
return 1;
};
}
/*
@ -347,18 +347,18 @@ static int Tvb_new (lua_State *L) {
}
DEFINE_TVBGET(guint8,1);
DEFINE_TVBGET(ntohs,2);
DEFINE_TVBGET(ntoh24,3);
DEFINE_TVBGET(ntohl,4);
DEFINE_TVBGET(ntohieee_float,4);
DEFINE_TVBGET(ntohieee_double,8);
DEFINE_TVBGET(guint8,1)
DEFINE_TVBGET(ntohs,2)
DEFINE_TVBGET(ntoh24,3)
DEFINE_TVBGET(ntohl,4)
DEFINE_TVBGET(ntohieee_float,4)
DEFINE_TVBGET(ntohieee_double,8)
DEFINE_TVBGET(letohs,1);
DEFINE_TVBGET(letoh24,2);
DEFINE_TVBGET(letohl,3);
DEFINE_TVBGET(letohieee_float,4);
DEFINE_TVBGET(letohieee_double,8);
DEFINE_TVBGET(letohs,1)
DEFINE_TVBGET(letoh24,2)
DEFINE_TVBGET(letohl,3)
DEFINE_TVBGET(letohieee_float,4)
DEFINE_TVBGET(letohieee_double,8)
static int Tvb_get_bytearray(lua_State* L) {
Tvb tvb = checkTvb(L,1);
@ -578,5 +578,5 @@ int Tvb_register(lua_State* L) {
lua_pop(L, 1);
return 1;
};
}

View File

@ -163,6 +163,8 @@ typedef struct _eth_tap {
* checkXxx(L,idx) gets a Xxx from an index after calling check_code (No Lua Error if it fails)
* pushXxx(L,xxx) pushes an Xxx into the stack
* isXxx(L,idx) tests whether we have an Xxx at idx
*
* LUA_CLASS_DEFINE must be used without trailing ';'
*/
#define LUA_CLASS_DEFINE(C,CN,check_code) \
C to##C(lua_State* L, int index) { \