VirtualBox

忽略:
時間撮記:
2017-4-19 下午01:35:47 (8 年 以前)
作者:
vboxsync
訊息:

GuestHost/OpenGL: make cppcheck happy

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/GuestHost/OpenGL/packer/pack_program.c

    r63942 r66609  
    1818{
    1919    CR_GET_PACKER_CONTEXT(pc);
    20     unsigned char *data_ptr;
     20    unsigned char *data_ptr = NULL;
    2121    int packet_length = sizeof(int) + sizeof(target) + sizeof(index) + sizeof(num) + num * 4 * sizeof(GLdouble);
    2222
     
    3636{
    3737    CR_GET_PACKER_CONTEXT(pc);
    38     unsigned char *data_ptr;
     38    unsigned char *data_ptr = NULL;
    3939    int packet_length = sizeof(int) + sizeof(target) + sizeof(index) + sizeof(num) + num * 4 * sizeof(GLfloat);
    4040
     
    162162{
    163163    const int packet_length = 32;
    164     unsigned char *data_ptr;
     164    unsigned char *data_ptr = NULL;
    165165    CR_GET_PACKER_CONTEXT(pc);
    166166
     
    181181{
    182182    const int packet_length = 20 + len;
    183     unsigned char *data_ptr;
     183    unsigned char *data_ptr = NULL;
    184184    CR_GET_PACKER_CONTEXT(pc);
    185185
     
    208208{
    209209    CR_GET_PACKER_CONTEXT(pc);
    210     unsigned char *data_ptr;
     210    unsigned char *data_ptr = NULL;
    211211    int packet_length = 32 + len;
    212212
     
    228228{
    229229    CR_GET_PACKER_CONTEXT(pc);
    230     unsigned char *data_ptr;
     230    unsigned char *data_ptr = NULL;
    231231    int packet_length = 48 + len;
    232232
     
    263263{
    264264    CR_GET_PACKER_CONTEXT(pc);
    265     unsigned char *data_ptr;
     265    unsigned char *data_ptr = NULL;
    266266    int packet_length;
    267267
     
    291291    int packet_length = 32 + len;
    292292    CR_GET_PACKER_CONTEXT(pc);
    293     unsigned char *data_ptr;
     293    unsigned char *data_ptr = NULL;
    294294    CR_GET_BUFFERED_POINTER(pc, packet_length);
    295295    WRITE_DATA(0, GLint, packet_length);
     
    309309    int packet_length = 32 + len;
    310310    CR_GET_PACKER_CONTEXT(pc);
    311     unsigned char *data_ptr;
     311    unsigned char *data_ptr = NULL;
    312312    CR_GET_BUFFERED_POINTER(pc, packet_length);
    313313    WRITE_DATA(0, GLint, packet_length);
     
    326326void PACK_APIENTRY crPackDeleteProgramsARB(GLsizei n, const GLuint *ids)
    327327{
    328     unsigned char *data_ptr;
     328    unsigned char *data_ptr = NULL;
    329329    int packet_length = sizeof(GLenum) + sizeof(n) + n * sizeof(*ids);
    330330
     
    344344{
    345345    const int packet_length = 20 + len;
    346     unsigned char *data_ptr;
     346    unsigned char *data_ptr = NULL;
    347347    CR_GET_PACKER_CONTEXT(pc);
    348348
     
    367367{
    368368    CR_GET_PACKER_CONTEXT(pc);
    369     unsigned char *data_ptr;
     369    unsigned char *data_ptr = NULL;
    370370    CR_GET_BUFFERED_POINTER(pc, 8);
    371371    pc->current.c.vertexAttrib.b4[index] = data_ptr + 4;
     
    383383{
    384384    CR_GET_PACKER_CONTEXT(pc);
    385     unsigned char *data_ptr;
     385    unsigned char *data_ptr = NULL;
    386386    CR_GET_BUFFERED_POINTER(pc, 20);
    387387    pc->current.c.vertexAttrib.i4[index] = data_ptr + 4;
     
    399399{
    400400    CR_GET_PACKER_CONTEXT(pc);
    401     unsigned char *data_ptr;
     401    unsigned char *data_ptr = NULL;
    402402    CR_GET_BUFFERED_POINTER(pc, 12);
    403403    pc->current.c.vertexAttrib.s4[index] = data_ptr + 4;
     
    415415{
    416416    CR_GET_PACKER_CONTEXT(pc);
    417     unsigned char *data_ptr;
     417    unsigned char *data_ptr = NULL;
    418418    CR_GET_BUFFERED_POINTER(pc, 8);
    419419    pc->current.c.vertexAttrib.ub4[index] = data_ptr + 4;
     
    431431{
    432432    CR_GET_PACKER_CONTEXT(pc);
    433     unsigned char *data_ptr;
     433    unsigned char *data_ptr = NULL;
    434434    CR_GET_BUFFERED_POINTER(pc, 20);
    435435    pc->current.c.vertexAttrib.ui4[index] = data_ptr + 4;
     
    447447{
    448448    CR_GET_PACKER_CONTEXT(pc);
    449     unsigned char *data_ptr;
     449    unsigned char *data_ptr = NULL;
    450450    CR_GET_BUFFERED_POINTER(pc, 12);
    451451    pc->current.c.vertexAttrib.s4[index] = data_ptr + 4;
     
    463463{
    464464    CR_GET_PACKER_CONTEXT(pc);
    465     unsigned char *data_ptr;
     465    unsigned char *data_ptr = NULL;
    466466    CR_GET_BUFFERED_POINTER(pc, 8);
    467467    pc->current.c.vertexAttrib.b4[index] = data_ptr + 4;
     
    479479{
    480480    CR_GET_PACKER_CONTEXT(pc);
    481     unsigned char *data_ptr;
     481    unsigned char *data_ptr = NULL;
    482482    CR_GET_BUFFERED_POINTER(pc, 20);
    483483    pc->current.c.vertexAttrib.i4[index] = data_ptr + 4;
     
    495495{
    496496    CR_GET_PACKER_CONTEXT(pc);
    497     unsigned char *data_ptr;
     497    unsigned char *data_ptr = NULL;
    498498    CR_GET_BUFFERED_POINTER(pc, 20);
    499499    pc->current.c.vertexAttrib.ui4[index] = data_ptr + 4;
     
    511511{
    512512    CR_GET_PACKER_CONTEXT(pc);
    513     unsigned char *data_ptr;
     513    unsigned char *data_ptr = NULL;
    514514    CR_GET_BUFFERED_POINTER(pc, 12);
    515515    pc->current.c.vertexAttrib.s4[index] = data_ptr + 4;
     
    528528{
    529529    CR_GET_PACKER_CONTEXT(pc);
    530     unsigned char *data_ptr;
     530    unsigned char *data_ptr = NULL;
    531531    CR_GET_BUFFERED_POINTER(pc, 8);
    532532    pc->current.c.vertexAttrib.ub4[index] = data_ptr + 4;
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette