Thread

  1. Fix for compiler warning triggered in WinGetFuncArgInPartition()

    Greg Burd <greg@burd.me> — 2025-10-09T14:21:23Z

    Hello,
    
    This is a minor change that avoids a "maybe uninitialized" warning that
    I've been seeing since:
    
    25a30bbd423 Add IGNORE NULLS/RESPECT NULLS option to Window functions.
    src/backend/postgres_lib.a.p/executor_nodeWindowAgg.c.o../src/backend/executor/nodeWindowAgg.c:
    In function
    ‘WinGetFuncArgInPartition’:../src/backend/executor/nodeWindowAgg.c:3809:33:
    warning:‘notnull_relpos’ may be used uninitialized
    [-Wmaybe-uninitialized] 3809 |         } while (notnull_offset <
    notnull_relpos);      |                  
    ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~../src/backend/executor/nodeWindowAgg.c:3723:33:
    note: ‘notnull_relpos’was declared here 3723 |         int               
    notnull_relpos;      |                                 ^~~~~~~~~~~~~~
    
    
    To calm the compiler's nerves this patch moves the initialization of
    notnull_relpos to later in the function.
    
    best.
    
    -greg