title: Left-hand operand of comma expression has no effect when initialzing array of a struct
body: <p>This is the pixel_t struct</p>
  
  <pre><code>typedef struct pixelType {
     unsigned char r;          /* red field                  */
     unsigned char g;          /* green field                */
     unsigned char b;          /* blue field                 */
  } pixel_t;
  </code></pre>
  
  <p>I am trying to initialize a list of pixel_t structs but am getting an error saying Left-hand operand of comma expression has no effect. Here is where I initialize it:</p>
  
  <pre><code>pixel_t pixVals[8] = { (pixel_t)(255,255,255), (pixel_t)(255,0,0), (pixel_t)(0,0,255), (pixel_t)(128,0,255), (pixel_t)(0,0,0), (pixel_t)(0,255,0), (pixel_t)(255,128,0), (pixel_t)(255,255,0) };
  </code></pre>
  
  <p>Any help? </p>