Re: [vserver] Kernel compile warnings

From: Tor Rune Skoglund <trs_at_swi.no>
Date: Fri 22 Dec 2017 - 09:53:21 GMT
Message-ID: <4e53dbc5-9322-63d7-8d56-bfeaf843efb6@swi.no>

Hi Herbert!

Den 21. des. 2017 22:34, skrev Herbert Poetzl:
> On Thu, Dec 21, 2017 at 09:36:54PM +0100, Tor Rune Skoglund wrote:
>> When compiling a 4.1.43 kernel with the latest patch
>> (patch-4.1.42-vs2.3.8.6.diff) with gcc6.4.0 it show some code warnings.
>> (See below. ) It probably does not matter (I don't know), but I thought
>> I at least should mentioned it in case someone or Herbert care.
>
> can you check with patch-4.1.48-vs2.3.8.6.diff on 4.1.48?
>
> http://vserver.13thfloor.at/Experimental/patch-4.1.48-vs2.3.8.6.diff

Same result with patch-4.1.48-vs2.3.8.6.diff on 4.1.48:

  CC kernel/vserver/proc.o
kernel/vserver/proc.c: In function ‘proc_xid_iterate’:
kernel/vserver/proc.c:620:43: warning: comparison of constant ‘0’ with
boolean expression is always false [-Wbool-compare]
   if (!dir_emit(ctx, ".", 1, ino, DT_DIR) < 0)
                                           ^
kernel/vserver/proc.c:626:44: warning: comparison of constant ‘0’ with
boolean expression is always false [-Wbool-compare]
   if (!dir_emit(ctx, "..", 2, ino, DT_DIR) < 0)
                                            ^
kernel/vserver/proc.c: In function ‘proc_nid_iterate’:
kernel/vserver/proc.c:701:43: warning: comparison of constant ‘0’ with
boolean expression is always false [-Wbool-compare]
   if (!dir_emit(ctx, ".", 1, ino, DT_DIR) < 0)
                                           ^
kernel/vserver/proc.c:707:44: warning: comparison of constant ‘0’ with
boolean expression is always false [-Wbool-compare]
   if (!dir_emit(ctx, "..", 2, ino, DT_DIR) < 0)
                                            ^
kernel/vserver/proc.c: In function ‘proc_virtual_iterate’:
kernel/vserver/proc.c:854:43: warning: comparison of constant ‘0’ with
boolean expression is always false [-Wbool-compare]
   if (!dir_emit(ctx, ".", 1, ino, DT_DIR) < 0)
                                           ^
kernel/vserver/proc.c:860:44: warning: comparison of constant ‘0’ with
boolean expression is always false [-Wbool-compare]
   if (!dir_emit(ctx, "..", 2, ino, DT_DIR) < 0)
                                            ^
kernel/vserver/proc.c: In function ‘proc_virtnet_iterate’:
kernel/vserver/proc.c:935:43: warning: comparison of constant ‘0’ with
boolean expression is always false [-Wbool-compare]
   if (!dir_emit(ctx, ".", 1, ino, DT_DIR) < 0)
                                           ^
kernel/vserver/proc.c:941:44: warning: comparison of constant ‘0’ with
boolean expression is always false [-Wbool-compare]
   if (!dir_emit(ctx, "..", 2, ino, DT_DIR) < 0)
                                            ^
  CC kernel/vserver/sysctl.o

BR, Tor Rune Skoglund

>>   CC      kernel/vserver/proc.o
>> kernel/vserver/proc.c: In function 'proc_xid_iterate':
>> kernel/vserver/proc.c:620:43: warning: comparison of constant '0' with
>> boolean expression is always false [-Wbool-compare]
>>    if (!dir_emit(ctx, ".", 1, ino, DT_DIR) < 0)
>>                                            ^
>> kernel/vserver/proc.c:626:44: warning: comparison of constant '0' with
>> boolean expression is always false [-Wbool-compare]
>>    if (!dir_emit(ctx, "..", 2, ino, DT_DIR) < 0)
>>                                             ^
>> kernel/vserver/proc.c: In function 'proc_nid_iterate':
>> kernel/vserver/proc.c:701:43: warning: comparison of constant '0' with
>> boolean expression is always false [-Wbool-compare]
>>    if (!dir_emit(ctx, ".", 1, ino, DT_DIR) < 0)
>>                                            ^
>> kernel/vserver/proc.c:707:44: warning: comparison of constant '0' with
>> boolean expression is always false [-Wbool-compare]
>>    if (!dir_emit(ctx, "..", 2, ino, DT_DIR) < 0)
>>                                             ^
>> kernel/vserver/proc.c: In function 'proc_virtual_iterate':
>> kernel/vserver/proc.c:854:43: warning: comparison of constant '0' with
>> boolean expression is always false [-Wbool-compare]
>>    if (!dir_emit(ctx, ".", 1, ino, DT_DIR) < 0)
>>                                            ^
>> kernel/vserver/proc.c:860:44: warning: comparison of constant '0' with
>> boolean expression is always false [-Wbool-compare]
>>    if (!dir_emit(ctx, "..", 2, ino, DT_DIR) < 0)
>>                                             ^
>> kernel/vserver/proc.c: In function 'proc_virtnet_iterate':
>> kernel/vserver/proc.c:935:43: warning: comparison of constant '0' with
>> boolean expression is always false [-Wbool-compare]
>>    if (!dir_emit(ctx, ".", 1, ino, DT_DIR) < 0)
>>                                            ^
>> kernel/vserver/proc.c:941:44: warning: comparison of constant '0' with
>> boolean expression is always false [-Wbool-compare]
>>    if (!dir_emit(ctx, "..", 2, ino, DT_DIR) < 0)
>>                                             ^
>>   LD      kernel/vserver/vserver.o
>
>
Received on Mon Dec 25 06:52:44 2017

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Mon 25 Dec 2017 - 06:52:44 GMT by hypermail 2.1.8