qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] (no subject)


From: no-reply
Subject: Re: [Qemu-devel] (no subject)
Date: Wed, 17 May 2017 22:31:10 -0700 (PDT)

Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [Qemu-devel] (no subject)
Type: series
Message-id: address@hidden

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
32d5d78 (no subject)

=== OUTPUT BEGIN ===
Checking PATCH 1/1: (no subject)...
ERROR: space prohibited before that '++' (ctx:WxB)
#34: FILE: hw/gpio/bcm2835_gpio.c:58:
+    for (i = 0; i < 10; i ++) {
                           ^

ERROR: space prohibited between function name and open parenthesis '('
#37: FILE: hw/gpio/bcm2835_gpio.c:60:
+        if (index < sizeof (s->fsel)) {

ERROR: space prohibited before that '++' (ctx:WxB)
#46: FILE: hw/gpio/bcm2835_gpio.c:70:
+    for (i = 0; i < 10; i ++) {
                           ^

ERROR: space prohibited between function name and open parenthesis '('
#49: FILE: hw/gpio/bcm2835_gpio.c:72:
+        if (index < sizeof (s->fsel)) {

ERROR: space prohibited after that '~' (ctx:WxW)
#100: FILE: hw/gpio/bcm2835_gpio.c:115:
+    uint32_t changes = val & ~ *lev;
                              ^

ERROR: space prohibited before that '++' (ctx:WxB)
#105: FILE: hw/gpio/bcm2835_gpio.c:119:
+    for (i = 0; i < count; i ++) {
                              ^

ERROR: space prohibited before that '++' (ctx:WxB)
#121: FILE: hw/gpio/bcm2835_gpio.c:136:
+    for (i = 0; i < count; i ++) {
                              ^

ERROR: space prohibited after that '~' (ctx:WxW)
#129: FILE: hw/gpio/bcm2835_gpio.c:143:
+    *lev &= ~ val;
             ^

ERROR: switch and case should be at the same indent
#141: FILE: hw/gpio/bcm2835_gpio.c:152:
     switch (offset) {
+        case GPFSEL0:
+        case GPFSEL1:
+        case GPFSEL2:
+        case GPFSEL3:
+        case GPFSEL4:
+        case GPFSEL5:
[...]
+        case GPSET0:
+        case GPSET1:
[...]
+        case GPCLR0:
+        case GPCLR1:
[...]
+        case GPLEV0:
[...]
+        case GPLEV1:
[...]
+        case GPEDS0:
+        case GPEDS1:
+        case GPREN0:
+        case GPREN1:
+        case GPFEN0:
+        case GPFEN1:
+        case GPHEN0:
+        case GPHEN1:
+        case GPLEN0:
+        case GPLEN1:
+        case GPAREN0:
+        case GPAREN1:
+        case GPAFEN0:
+        case GPAFEN1:
+        case GPPUD:
+        case GPPUDCLK0:
+        case GPPUDCLK1:
[...]
+        default:

ERROR: space prohibited after that '-' (ctx:WxW)
#200: FILE: hw/gpio/bcm2835_gpio.c:169:
+            if (s->panel.socket != - 1) {
                                    ^

ERROR: space prohibited after that '-' (ctx:WxW)
#208: FILE: hw/gpio/bcm2835_gpio.c:177:
+            if (s->panel.socket != - 1) {
                                    ^

ERROR: switch and case should be at the same indent
#252: FILE: hw/gpio/bcm2835_gpio.c:219:
     switch (offset) {
+        case GPFSEL0:
+        case GPFSEL1:
+        case GPFSEL2:
+        case GPFSEL3:
+        case GPFSEL4:
+        case GPFSEL5:
[...]
+        case GPSET0:
[...]
+        case GPSET1:
[...]
+        case GPCLR0:
[...]
+        case GPCLR1:
[...]
+        case GPLEV0:
+        case GPLEV1:
[...]
+        case GPEDS0:
+        case GPEDS1:
+        case GPREN0:
+        case GPREN1:
+        case GPFEN0:
+        case GPFEN1:
+        case GPHEN0:
+        case GPHEN1:
+        case GPLEN0:
+        case GPLEN1:
+        case GPAREN0:
+        case GPAREN1:
+        case GPAFEN0:
+        case GPAFEN1:
+        case GPPUD:
+        case GPPUDCLK0:
+        case GPPUDCLK1:
[...]
+        default:

ERROR: space prohibited after that '-' (ctx:WxW)
#308: FILE: hw/gpio/bcm2835_gpio.c:230:
+            if (s->panel.socket != - 1) {
                                    ^

WARNING: line over 80 characters
#310: FILE: hw/gpio/bcm2835_gpio.c:232:
+                senddatatopanel(&s->panel, Data, true); //John Bradley dummy 
GPIO Panel

ERROR: do not use C99 // comments
#310: FILE: hw/gpio/bcm2835_gpio.c:232:
+                senddatatopanel(&s->panel, Data, true); //John Bradley dummy 
GPIO Panel

ERROR: space prohibited after that '-' (ctx:WxW)
#315: FILE: hw/gpio/bcm2835_gpio.c:237:
+            if (s->panel.socket != - 1) {
                                    ^

WARNING: line over 80 characters
#318: FILE: hw/gpio/bcm2835_gpio.c:240:
+                senddatatopanel(&s->panel, Data, true); //John Bradley dummy 
GPIO Panel

ERROR: do not use C99 // comments
#318: FILE: hw/gpio/bcm2835_gpio.c:240:
+                senddatatopanel(&s->panel, Data, true); //John Bradley dummy 
GPIO Panel

ERROR: space prohibited after that '-' (ctx:WxW)
#323: FILE: hw/gpio/bcm2835_gpio.c:245:
+            if (s->panel.socket != - 1) {
                                    ^

WARNING: line over 80 characters
#325: FILE: hw/gpio/bcm2835_gpio.c:247:
+                senddatatopanel(&s->panel, Data, false); //John Bradley dummy 
GPIO Panel

ERROR: do not use C99 // comments
#325: FILE: hw/gpio/bcm2835_gpio.c:247:
+                senddatatopanel(&s->panel, Data, false); //John Bradley dummy 
GPIO Panel

ERROR: space prohibited after that '-' (ctx:WxW)
#330: FILE: hw/gpio/bcm2835_gpio.c:252:
+            if (s->panel.socket != - 1) {
                                    ^

WARNING: line over 80 characters
#333: FILE: hw/gpio/bcm2835_gpio.c:255:
+                senddatatopanel(&s->panel, Data, false); //John Bradley dummy 
GPIO Panel

ERROR: do not use C99 // comments
#333: FILE: hw/gpio/bcm2835_gpio.c:255:
+                senddatatopanel(&s->panel, Data, false); //John Bradley dummy 
GPIO Panel

ERROR: space prohibited before that '++' (ctx:WxB)
#376: FILE: hw/gpio/bcm2835_gpio.c:296:
+    for (i = 0; i < 6; i ++) {
                          ^

WARNING: line over 80 characters
#389: FILE: hw/gpio/bcm2835_gpio.c:312:
+                                                 .endianness = 
DEVICE_NATIVE_ENDIAN,

WARNING: line over 80 characters
#405: FILE: hw/gpio/bcm2835_gpio.c:319:
+                                                        .fields = 
(VMStateField[])

ERROR: space prohibited between function name and open parenthesis '('
#420: FILE: hw/gpio/bcm2835_gpio.c:335:
+    qbus_create_inplace(&s->sdbus, sizeof (s->sdbus),

ERROR: do not use C99 // comments
#431: FILE: hw/gpio/bcm2835_gpio.c:345:
+        sendpincount(&s->panel, 54); //PI Has 54 Pins

WARNING: line over 80 characters
#432: FILE: hw/gpio/bcm2835_gpio.c:346:
+        sendenabledmap(&s->panel, 0x003FFFFFFFFFFFFC); //Pins 0 & 1 are I2C so 
disable

ERROR: do not use C99 // comments
#432: FILE: hw/gpio/bcm2835_gpio.c:346:
+        sendenabledmap(&s->panel, 0x003FFFFFFFFFFFFC); //Pins 0 & 1 are I2C so 
disable

ERROR: line over 90 characters
#433: FILE: hw/gpio/bcm2835_gpio.c:347:
+        sendinputmap(&s->panel, 0x0000000000000000); //There are no dedicated 
input pins I know off

ERROR: do not use C99 // comments
#433: FILE: hw/gpio/bcm2835_gpio.c:347:
+        sendinputmap(&s->panel, 0x0000000000000000); //There are no dedicated 
input pins I know off

WARNING: line over 80 characters
#434: FILE: hw/gpio/bcm2835_gpio.c:348:
+        sendoutputmap(&s->panel, 0x0000800000000000); //Pin 53 is dedicated 
output LED

ERROR: do not use C99 // comments
#434: FILE: hw/gpio/bcm2835_gpio.c:348:
+        sendoutputmap(&s->panel, 0x0000800000000000); //Pin 53 is dedicated 
output LED

WARNING: line over 80 characters
#436: FILE: hw/gpio/bcm2835_gpio.c:350:
+        printf("Couldn't connect to a GPIO panel\n"); //John Bradley dummy 
GPIO Panel

ERROR: do not use C99 // comments
#436: FILE: hw/gpio/bcm2835_gpio.c:350:
+        printf("Couldn't connect to a GPIO panel\n"); //John Bradley dummy 
GPIO Panel

ERROR: space prohibited after that '&' (ctx:WxW)
#466: FILE: hw/gpio/bcm2835_gpio.c:381:
+    dc->vmsd = & vmstate_bcm2835_gpio;
                ^

ERROR: space prohibited after that '&' (ctx:WxW)
#467: FILE: hw/gpio/bcm2835_gpio.c:382:
+    dc->realize = & bcm2835_gpio_realize;
                   ^

ERROR: space prohibited after that '&' (ctx:WxW)
#468: FILE: hw/gpio/bcm2835_gpio.c:383:
+    dc->reset = & bcm2835_gpio_reset;
                 ^

WARNING: line over 80 characters
#479: FILE: hw/gpio/bcm2835_gpio.c:389:
+                                           .instance_size = sizeof 
(BCM2835GpioState),

ERROR: space prohibited between function name and open parenthesis '('
#479: FILE: hw/gpio/bcm2835_gpio.c:389:
+                                           .instance_size = sizeof 
(BCM2835GpioState),

WARNING: line over 80 characters
#481: FILE: hw/gpio/bcm2835_gpio.c:391:
+                                           .class_init = 
bcm2835_gpio_class_init,

WARNING: architecture specific defines should be avoided
#530: FILE: include/qemu/PanelEmu.h:17:
+#ifdef __cplusplus

ERROR: do not use C99 // comments
#539: FILE: include/qemu/PanelEmu.h:26:
+#define DEFAULT_PORT 0xb1ff       //45567

ERROR: code indent should never use tabs
#547: FILE: include/qemu/PanelEmu.h:34:
+^I                       unless something changed */$

ERROR: do not use C99 // comments
#548: FILE: include/qemu/PanelEmu.h:35:
+        int ProtocolInUse;  //What version of the protocol are we using.

ERROR: "foo* bar" should be "foo *bar"
#551: FILE: include/qemu/PanelEmu.h:38:
+    bool panel_open(panel_connection_t* h);

ERROR: "foo* bar" should be "foo *bar"
#553: FILE: include/qemu/PanelEmu.h:40:
+    bool panel_read(panel_connection_t* h, uint64_t *pinS);

ERROR: "foo* bar" should be "foo *bar"
#554: FILE: include/qemu/PanelEmu.h:41:
+    void senddatatopanel(panel_connection_t* h, uint64_t pinS, bool Value);

ERROR: "foo* bar" should be "foo *bar"
#555: FILE: include/qemu/PanelEmu.h:42:
+    void panel_send_read_command(panel_connection_t* h);

ERROR: "foo* bar" should be "foo *bar"
#556: FILE: include/qemu/PanelEmu.h:43:
+    void sendpincount(panel_connection_t* h, int Num);

ERROR: "foo* bar" should be "foo *bar"
#557: FILE: include/qemu/PanelEmu.h:44:
+    void sendenabledmap(panel_connection_t* h, uint64_t pins);

ERROR: "foo* bar" should be "foo *bar"
#558: FILE: include/qemu/PanelEmu.h:45:
+    void sendinputmap(panel_connection_t* h, uint64_t pins);

ERROR: "foo* bar" should be "foo *bar"
#559: FILE: include/qemu/PanelEmu.h:46:
+    void sendoutputmap(panel_connection_t* h, uint64_t pins);

WARNING: architecture specific defines should be avoided
#562: FILE: include/qemu/PanelEmu.h:49:
+#ifdef __cplusplus

WARNING: architecture specific defines should be avoided
#596: FILE: util/PanelEmu.c:13:
+#ifdef __MINGW32__

ERROR: open brace '{' following enum go on the same line
#608: FILE: util/PanelEmu.c:25:
+typedef enum
+{

ERROR: do not use C99 // comments
#625: FILE: util/PanelEmu.c:42:
+#define PACKETLEN   0  //Includes Packet Length

ERROR: open brace '{' following struct go on the same line
#629: FILE: util/PanelEmu.c:46:
+typedef struct
+{

ERROR: "foo* bar" should be "foo *bar"
#635: FILE: util/PanelEmu.c:52:
+static void panel_send_protocol_command(panel_connection_t* h)

ERROR: "foo* bar" should be "foo *bar"
#647: FILE: util/PanelEmu.c:64:
+void panel_send_read_command(panel_connection_t* h)

ERROR: "foo* bar" should be "foo *bar"
#658: FILE: util/PanelEmu.c:75:
+void senddatatopanel(panel_connection_t* h, uint64_t pin, bool val)

ERROR: spaces required around that '-' (ctx:VxV)
#662: FILE: util/PanelEmu.c:79:
+    Pkt.Data[PACKETLEN] = (char *) &Pkt.Data[6 + 1]-(char *) &Pkt.Data[0];
                                                    ^

ERROR: spaces required around that '&' (ctx:VxV)
#665: FILE: util/PanelEmu.c:82:
+    Pkt.Data[3] = (unsigned short int) ((pin >> 16)&0xFFFF);
                                                    ^

ERROR: spaces required around that '&' (ctx:VxV)
#667: FILE: util/PanelEmu.c:84:
+    Pkt.Data[5] = (unsigned short int) ((pin >> 48)&0xFFFF);
                                                    ^

ERROR: "foo* bar" should be "foo *bar"
#673: FILE: util/PanelEmu.c:90:
+void sendpincount(panel_connection_t* h, int val)

ERROR: spaces required around that '-' (ctx:VxV)
#677: FILE: util/PanelEmu.c:94:
+    Pkt.Data[PACKETLEN] = (char *) &Pkt.Data[2 + 1]-(char *) &Pkt.Data[0];
                                                    ^

ERROR: "foo* bar" should be "foo *bar"
#684: FILE: util/PanelEmu.c:101:
+void sendenabledmap(panel_connection_t* h, uint64_t pin)

ERROR: spaces required around that '-' (ctx:VxV)
#688: FILE: util/PanelEmu.c:105:
+    Pkt.Data[PACKETLEN] = (char *) &Pkt.Data[5 + 1]-(char *) &Pkt.Data[0];
                                                    ^

ERROR: spaces required around that '&' (ctx:VxV)
#691: FILE: util/PanelEmu.c:108:
+    Pkt.Data[3] = (unsigned short int) ((pin >> 16)&0xFFFF);
                                                    ^

ERROR: spaces required around that '&' (ctx:VxV)
#693: FILE: util/PanelEmu.c:110:
+    Pkt.Data[5] = (unsigned short int) ((pin >> 48)&0xFFFF);
                                                    ^

ERROR: "foo* bar" should be "foo *bar"
#698: FILE: util/PanelEmu.c:115:
+void sendinputmap(panel_connection_t* h, uint64_t pin)

ERROR: spaces required around that '-' (ctx:VxV)
#702: FILE: util/PanelEmu.c:119:
+    Pkt.Data[PACKETLEN] = (char *) &Pkt.Data[5 + 1]-(char *) &Pkt.Data[0];
                                                    ^

ERROR: spaces required around that '&' (ctx:VxV)
#705: FILE: util/PanelEmu.c:122:
+    Pkt.Data[3] = (unsigned short int) ((pin >> 16)&0xFFFF);
                                                    ^

ERROR: spaces required around that '&' (ctx:VxV)
#707: FILE: util/PanelEmu.c:124:
+    Pkt.Data[5] = (unsigned short int) ((pin >> 48)&0xFFFF);
                                                    ^

ERROR: "foo* bar" should be "foo *bar"
#712: FILE: util/PanelEmu.c:129:
+void sendoutputmap(panel_connection_t* h, uint64_t pin)

ERROR: spaces required around that '-' (ctx:VxV)
#716: FILE: util/PanelEmu.c:133:
+    Pkt.Data[PACKETLEN] = (char *) &Pkt.Data[5 + 1]-(char *) &Pkt.Data[0];
                                                    ^

ERROR: spaces required around that '&' (ctx:VxV)
#719: FILE: util/PanelEmu.c:136:
+    Pkt.Data[3] = (unsigned short int) ((pin >> 16)&0xFFFF);
                                                    ^

ERROR: spaces required around that '&' (ctx:VxV)
#721: FILE: util/PanelEmu.c:138:
+    Pkt.Data[5] = (unsigned short int) ((pin >> 48)&0xFFFF);
                                                    ^

ERROR: space prohibited after that '-' (ctx:WxW)
#728: FILE: util/PanelEmu.c:145:
+    if (send(h->socket, (char *) Pkt, Pkt->Data[PACKETLEN], 0) == - 1) {
                                                                   ^

WARNING: architecture specific defines should be avoided
#730: FILE: util/PanelEmu.c:147:
+#ifdef __MINGW32__

ERROR: space prohibited after that '-' (ctx:WxW)
#735: FILE: util/PanelEmu.c:152:
+        h->socket = - 1; /* act like we never connected */
                     ^

ERROR: "foo* bar" should be "foo *bar"
#740: FILE: util/PanelEmu.c:157:
+bool panel_read(panel_connection_t* h, uint64_t* Data)

ERROR: space prohibited between function name and open parenthesis '('
#746: FILE: util/PanelEmu.c:163:
+    CommandPacket *PktPtr = (CommandPacket *) malloc(sizeof (CommandPacket));

ERROR: space prohibited after that '-' (ctx:WxW)
#758: FILE: util/PanelEmu.c:175:
+    if (h->socket != - 1) {
                      ^

ERROR: do not use C99 // comments
#762: FILE: util/PanelEmu.c:179:
+//      printf(PANEL_NAME "panel_read\n");

ERROR: spaces required around that '&&' (ctx:VxO)
#765: FILE: util/PanelEmu.c:182:
+        while (NoError&&! NoData) {
                       ^

ERROR: space prohibited after that '!' (ctx:OxW)
#765: FILE: util/PanelEmu.c:182:
+        while (NoError&&! NoData) {
                         ^

ERROR: line over 90 characters
#770: FILE: util/PanelEmu.c:187:
+                    if ((LengthInBuffer = recv(h->socket, (char *) 
&Pkt[ReadStart], sizeof (*Pkt) - ReadStart, 0)) > 0) {

ERROR: space prohibited between function name and open parenthesis '('
#770: FILE: util/PanelEmu.c:187:
+                    if ((LengthInBuffer = recv(h->socket, (char *) 
&Pkt[ReadStart], sizeof (*Pkt) - ReadStart, 0)) > 0) {

ERROR: do not use assignment in if condition
#770: FILE: util/PanelEmu.c:187:
+                    if ((LengthInBuffer = recv(h->socket, (char *) 
&Pkt[ReadStart], sizeof (*Pkt) - ReadStart, 0)) > 0) {

ERROR: space prohibited before that '++' (ctx:WxB)
#772: FILE: util/PanelEmu.c:189:
+                        for (int i = 0; LengthInBuffer > 0; i ++) {
                                                               ^

ERROR: that open brace { should be on the previous line
#774: FILE: util/PanelEmu.c:191:
+                                switch (Pkt->Data[i + PACKETTYPE])
+                                {

WARNING: line over 80 characters
#778: FILE: util/PanelEmu.c:195:
+                                        *Data |= ((uint64_t) Pkt->Data[i + 3]) 
<< 16;

WARNING: line over 80 characters
#779: FILE: util/PanelEmu.c:196:
+                                        *Data |= ((uint64_t) Pkt->Data[i + 4]) 
<< 32;

WARNING: line over 80 characters
#780: FILE: util/PanelEmu.c:197:
+                                        *Data |= ((uint64_t) Pkt->Data[i + 5]) 
<< 48;

WARNING: line over 80 characters
#786: FILE: util/PanelEmu.c:203:
+                                        h->ProtocolInUse = (int) Pkt->Data[i + 
2];

ERROR: that open brace { should be on the previous line
#787: FILE: util/PanelEmu.c:204:
+                                        if(h->ProtocolInUse!=-1)
+                                        {

ERROR: spaces required around that '!=' (ctx:VxO)
#787: FILE: util/PanelEmu.c:204:
+                                        if(h->ProtocolInUse!=-1)
                                                            ^

ERROR: space required before that '-' (ctx:OxV)
#787: FILE: util/PanelEmu.c:204:
+                                        if(h->ProtocolInUse!=-1)
                                                              ^

ERROR: space required before the open parenthesis '('
#787: FILE: util/PanelEmu.c:204:
+                                        if(h->ProtocolInUse!=-1)

ERROR: line over 90 characters
#789: FILE: util/PanelEmu.c:206:
+                                            printf(PANEL_NAME "Protocol %d in 
used\n",h->ProtocolInUse);

ERROR: space required after that ',' (ctx:VxV)
#789: FILE: util/PanelEmu.c:206:
+                                            printf(PANEL_NAME "Protocol %d in 
used\n",h->ProtocolInUse);
                                                                                
      ^

ERROR: that open brace { should be on the previous line
#791: FILE: util/PanelEmu.c:208:
+                                        else
+                                        {

ERROR: else should follow close brace '}'
#791: FILE: util/PanelEmu.c:208:
+                                        }
+                                        else

ERROR: trailing whitespace
#793: FILE: util/PanelEmu.c:210:
+                                            printf(PANEL_NAME "No Common 
Protocol\n");                                            $

ERROR: line over 90 characters
#793: FILE: util/PanelEmu.c:210:
+                                            printf(PANEL_NAME "No Common 
Protocol\n");                                            

WARNING: line over 80 characters
#798: FILE: util/PanelEmu.c:215:
+                                        printf(PANEL_NAME "Invalid data 
received\n");

ERROR: line over 90 characters
#802: FILE: util/PanelEmu.c:219:
+                                i += Pkt->Data[PACKETLEN]; //                  
                                        Pkt=(CommandPacket 
*)&(Pkt->Data[Pkt->Data[PACKETLEN]]);

ERROR: code indent should never use tabs
#802: FILE: util/PanelEmu.c:219:
+                                i += Pkt->Data[PACKETLEN]; 
//^I^I^I^I^I^I^I^IPkt=(CommandPacket *)&(Pkt->Data[Pkt->Data[PACKETLEN]]);$

ERROR: do not use C99 // comments
#802: FILE: util/PanelEmu.c:219:
+                                i += Pkt->Data[PACKETLEN]; //                  
                                        Pkt=(CommandPacket 
*)&(Pkt->Data[Pkt->Data[PACKETLEN]]);

ERROR: space prohibited before that '++' (ctx:WxB)
#805: FILE: util/PanelEmu.c:222:
+                                for (int j = 0; j < LengthInBuffer; j ++) {
                                                                       ^

WARNING: architecture specific defines should be avoided
#826: FILE: util/PanelEmu.c:243:
+#ifdef __MINGW32__

ERROR: space prohibited after that '-' (ctx:WxW)
#831: FILE: util/PanelEmu.c:248:
+                h->socket = - 1; /* act like we never connected */
                             ^

ERROR: "foo* bar" should be "foo *bar"
#843: FILE: util/PanelEmu.c:260:
+bool panel_open(panel_connection_t* h)

ERROR: trailing whitespace
#846: FILE: util/PanelEmu.c:263:
+#ifdef __MINGW32__    $

WARNING: architecture specific defines should be avoided
#846: FILE: util/PanelEmu.c:263:
+#ifdef __MINGW32__    

ERROR: trailing whitespace
#849: FILE: util/PanelEmu.c:266:
+    struct sockaddr_in remote;    $

ERROR: trailing whitespace
#851: FILE: util/PanelEmu.c:268:
+    $

ERROR: trailing whitespace
#854: FILE: util/PanelEmu.c:271:
+#ifdef __MINGW32__    $

WARNING: architecture specific defines should be avoided
#854: FILE: util/PanelEmu.c:271:
+#ifdef __MINGW32__    

ERROR: trailing whitespace
#857: FILE: util/PanelEmu.c:274:
+    printf("NOT __MINGW32__\n");   $

ERROR: trailing whitespace
#858: FILE: util/PanelEmu.c:275:
+#endif    $

ERROR: trailing whitespace
#859: FILE: util/PanelEmu.c:276:
+    $

ERROR: spaces required around that '=' (ctx:VxO)
#860: FILE: util/PanelEmu.c:277:
+    h->socket=-1;
              ^

ERROR: space required before that '-' (ctx:OxV)
#860: FILE: util/PanelEmu.c:277:
+    h->socket=-1;
               ^

ERROR: spaces required around that '=' (ctx:VxO)
#861: FILE: util/PanelEmu.c:278:
+    h->ProtocolInUse=-1;
                     ^

ERROR: space required before that '-' (ctx:OxV)
#861: FILE: util/PanelEmu.c:278:
+    h->ProtocolInUse=-1;
                      ^

ERROR: trailing whitespace
#862: FILE: util/PanelEmu.c:279:
+    $

WARNING: architecture specific defines should be avoided
#863: FILE: util/PanelEmu.c:280:
+#ifdef __MINGW32__

ERROR: braces {} are necessary for all arms of this statement
#865: FILE: util/PanelEmu.c:282:
+    if (WSAStartup(MAKEWORD(1, 1), &wsadata) == SOCKET_ERROR) {
[...]
+    else
[...]

ERROR: else should follow close brace '}'
#868: FILE: util/PanelEmu.c:285:
+    }
+    else

ERROR: space prohibited after that '-' (ctx:WxW)
#871: FILE: util/PanelEmu.c:288:
+        if ((h->socket = socket(AF_INET, SOCK_STREAM, 0)) != - 1) {
                                                              ^

ERROR: do not use assignment in if condition
#871: FILE: util/PanelEmu.c:288:
+        if ((h->socket = socket(AF_INET, SOCK_STREAM, 0)) != - 1) {

WARNING: architecture specific defines should be avoided
#872: FILE: util/PanelEmu.c:289:
+#ifdef __MINGW32__

ERROR: trailing whitespace
#876: FILE: util/PanelEmu.c:293:
+            remote.sin_addr.s_addr = inet_addr("127.0.0.1");            $

ERROR: use memset() instead of bzero()
#878: FILE: util/PanelEmu.c:295:
+            bzero((char *)&remote, sizeof(remote));

ERROR: line over 90 characters
#883: FILE: util/PanelEmu.c:300:
+            if ((rv=connect(h->socket, (struct sockaddr *) &remote, sizeof 
(remote))) != - 1) {

ERROR: space prohibited between function name and open parenthesis '('
#883: FILE: util/PanelEmu.c:300:
+            if ((rv=connect(h->socket, (struct sockaddr *) &remote, sizeof 
(remote))) != - 1) {

ERROR: spaces required around that '=' (ctx:VxV)
#883: FILE: util/PanelEmu.c:300:
+            if ((rv=connect(h->socket, (struct sockaddr *) &remote, sizeof 
(remote))) != - 1) {
                    ^

ERROR: space prohibited after that '-' (ctx:WxW)
#883: FILE: util/PanelEmu.c:300:
+            if ((rv=connect(h->socket, (struct sockaddr *) &remote, sizeof 
(remote))) != - 1) {
                                                                                
          ^

ERROR: do not use assignment in if condition
#883: FILE: util/PanelEmu.c:300:
+            if ((rv=connect(h->socket, (struct sockaddr *) &remote, sizeof 
(remote))) != - 1) {

WARNING: architecture specific defines should be avoided
#884: FILE: util/PanelEmu.c:301:
+#ifdef __MINGW32__

WARNING: line over 80 characters
#886: FILE: util/PanelEmu.c:303:
+                setsockopt(h->socket, IPPROTO_TCP, TCP_NODELAY, &value, sizeof 
( value));

ERROR: space prohibited between function name and open parenthesis '('
#886: FILE: util/PanelEmu.c:303:
+                setsockopt(h->socket, IPPROTO_TCP, TCP_NODELAY, &value, sizeof 
( value));

ERROR: space prohibited after that open parenthesis '('
#886: FILE: util/PanelEmu.c:303:
+                setsockopt(h->socket, IPPROTO_TCP, TCP_NODELAY, &value, sizeof 
( value));

ERROR: space required after that ',' (ctx:VxV)
#894: FILE: util/PanelEmu.c:311:
+                printf(PANEL_NAME "Connected OK %d\n",rv);
                                                      ^

ERROR: trailing whitespace
#897: FILE: util/PanelEmu.c:314:
+                $

ERROR: spaces required around that '=' (ctx:VxV)
#898: FILE: util/PanelEmu.c:315:
+                returnval=true;
                          ^

ERROR: space required after that ',' (ctx:VxV)
#900: FILE: util/PanelEmu.c:317:
+                printf(PANEL_NAME "connection Failes %d\n",rv);
                                                           ^

WARNING: architecture specific defines should be avoided
#901: FILE: util/PanelEmu.c:318:
+#ifdef __MINGW32__

ERROR: space prohibited after that '-' (ctx:WxW)
#906: FILE: util/PanelEmu.c:323:
+                h->socket = - 1;
                             ^

total: 125 errors, 28 warnings, 857 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]